note 18219 added to function.explode

From: Date: Tue, 15 Jan 2002 02:14:31 +0000
Subject: note 18219 added to function.explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-24820@lists.php.net to get a copy of this message
function getfilename($fullfilename) { $a = explode("\\",$fullfilename); $last = count($a); $last--; return $a[$last]; } Extracts the filename from a full-filename Example: $full= "C:\User\Data\Text\Textfile.txt"; getfilename($full) would return Textfile.txt Nice noh? -- http://www.php.net/manual/en/function.explode.php http://master.php.net/manage/user-notes.php?action=edit+18219 http://master.php.net/manage/user-notes.php?action=delete+18219 http://master.php.net/manage/user-notes.php?action=reject+18219

« previous php.notes (#24820) next »