note 23904 added to function.basename
| From: | john at darkcore dot net | Date: | Wed, 31 Jul 2002 13:57:01 +0000 |
| Subject: | note 23904 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34046@lists.php.net to get a copy of this message | ||
Some users contributed functions to return a file extnsion but you do not need any special functions
to return the file extension. PHP has this built in.
Simply:
$extension = strrchr($strFile, ".");
--
http://www.php.net/manual/en/function.basename.php
http://master.php.net/manage/user-notes.php?action=edit+23904
http://master.php.net/manage/user-notes.php?action=delete+23904
http://master.php.net/manage/user-notes.php?action=reject+23904