note 94737 deleted from function.explode by danbrown
| From: | danbrown@php.net | Date: | Mon, 23 Nov 2009 15:37:03 +0000 |
| Subject: | note 94737 deleted from function.explode by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163207@lists.php.net to get a copy of this message | ||
Note Submitter: chris mccabe notquiteapound at hotmail dot com
----
a simple function for explode to extract the image name from a url
I have included urldecode here but normally i use it before the function call as I'm usually
doing something else with the url
function imageName($url){
$url = urldecode($url);
$imageName = explode("/",$url);
$count = count($imageName);
$count = $count - 1;
return $imageName[$count];
}