Re: Derive bottom-most dir from string???
| From: | Shawn McKenzie | Date: | Thu, 20 Feb 2003 20:34:46 +0000 |
| Subject: | Re: Derive bottom-most dir from string??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136411@lists.php.net to get a copy of this message | ||
Sorry... Think I was over complicating it.
Seems the last element of $somearray from $somearray = explode("/",
$somepath); will work well.
Thanks!
Shawn
"Shawn McKenzie" <nospam@mckenzies.net> wrote in message
news:20030220202742.99055.qmail@pb1.pair.com...
> 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
>
>