note 94737 added to function.explode
| From: | chrismccabenotquiteapound at hotmail dot com | Date: | Sat, 21 Nov 2009 02:49:15 +0000 |
| Subject: | note 94737 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163164@lists.php.net to get a copy of this message | ||
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];
}
----
Server IP: 92.48.74.199
Probable Submitter: 86.154.184.47
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- https://master.php.net/note/edit/94737
Del: integrated -- https://master.php.net/note/delete/94737/integrated
Del: useless -- https://master.php.net/note/delete/94737/useless
Del: bad code -- https://master.php.net/note/delete/94737/bad+code
Del: spam -- https://master.php.net/note/delete/94737/spam
Del: non-english -- https://master.php.net/note/delete/94737/non-english
Del: in docs -- https://master.php.net/note/delete/94737/in+docs
Del: other reasons-- https://master.php.net/note/delete/94737
Reject -- https://master.php.net/note/reject/94737
Search -- https://master.php.net/manage/user-notes.php