note 87049 modified in function.readdir by danbrown
| From: | danbrown@php.net | Date: | Mon, 17 Nov 2008 01:54:39 +0000 |
| Subject: | note 87049 modified in function.readdir by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-146615@lists.php.net to get a copy of this message | ||
A really better and shorter way to get extension is via:
<?php $extension = end(explode('.', $filename)); ?>
this will print the last part after the last dot :)
--was--
A really better and shorter way to get extension is via:
$extension = end(explode('.', $filename));
this will print the last part after the last dot :)
http://php.net/manual/en/function.readdir.php