I would like to get just the name of the parent folder of which a script is currently running in the directory?
if we have a script called foo.php with a path of "/Users/Somone/Sites/public/foo.php", how can i go about just getting "public"out of the that file path and not the entire directory tree?
any help would be great.
thanks.