Sorry... Think I was over complicating it.
Seems the last element of $somearray from $somearray = explode("/",
$somepath); will work well.
Thanks!
Shawn
"Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is there an easy way to derive the bottom-most directory from a string
> containing a path?
>
> Example: $somepath = "html/testsite/templates/shopping";
>
> Becomes: "shopping"
>
> TIA
> -Shawn
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php