note 24644 deleted from function.basename by spic
| From: | spic@php.net | Date: | Tue, 17 Sep 2002 09:06:11 +0000 |
| Subject: | note 24644 deleted from function.basename by spic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36780@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