note 24644 added to function.basename
| From: | iamfast at tampabay dot rr dot com | Date: | Sat, 24 Aug 2002 06:47:09 +0000 |
| Subject: | note 24644 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35431@lists.php.net to get a copy of this message | ||
think outside the bun! taco belllllllll!
okay... lets think... every extension is what follows the last . ... right?
so why not make this super easy...
function getext($in_file) {
list($ext,)=explode('.',strrev($in_file));
return(strrev($ext));
}
i think that clears the air up.
--Nate
--
http://www.php.net/manual/en/function.basename.php
http://master.php.net/manage/user-notes.php?action=edit+24644
http://master.php.net/manage/user-notes.php?action=delete+24644
http://master.php.net/manage/user-notes.php?action=reject+24644