note 29009 added to function.basename

From: Date: Thu, 30 Jan 2003 08:47:25 +0000
Subject: note 29009 added to function.basename
Groups: php.notes 
Request: Send a blank email to php-notes+get-43123@lists.php.net to get a copy of this message
hey, fellows! For those who are looking for simple way to get the extension of the file (even if the file name is like: the.path/to/some.file.ext), I suggest something like this: $extension=end(explode(".", $file_name)); Does it work? It does in my scripts! ;) -- Nice day/night! -- http://www.php.net/manual/en/function.basename.php http://master.php.net/manage/user-notes.php?action=edit+29009 http://master.php.net/manage/user-notes.php?action=delete+29009 http://master.php.net/manage/user-notes.php?action=reject+29009

« previous php.notes (#43123) next »