note 44268 added to function.explode
| From: | robbiesmith79athotmaildotcom at rn2 dot php dot net | Date: | Tue, 20 Jul 2004 05:14:13 +0000 |
| Subject: | note 44268 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73667@lists.php.net to get a copy of this message | ||
I have an input field:
<input type="file" name="file">
that gets a file from my windows box. The path is something like:
C:/Documents and Settings/My Documents/....../image.gif
I had to do this to get the file name "image.gif"
$test = str_replace("\\",",",$file);
$arr=explode(",,", $test);
$size=count($arr);
echo $arr[$size-1];
// prints
image.gif
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44268
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44268&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44268&report=yes
Search -- http://master.php.net/manage/user-notes.php