note 92318 deleted from function.basename by danbrown
| From: | danbrown@php.net | Date: | Sun, 19 Jul 2009 13:35:55 +0000 |
| Subject: | note 92318 deleted from function.basename by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-158474@lists.php.net to get a copy of this message | ||
Note Submitter: frantik
----
A simple way to get a file's extension:
<?php
function get_ext($filename)
{ $parts = explode('.',$filename);
return $parts[count($parts) - 1];
}
?>