note 47176 deleted from function.pathinfo by betz
| From: | betz@php.net | Date: | Fri, 05 Nov 2004 10:54:02 +0000 |
| Subject: | note 47176 deleted from function.pathinfo by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80137@lists.php.net to get a copy of this message | ||
Note Submitter: siralucard_1 at hotmail dot com
----
In reference to the last post, this can be also used and it is a little more explainable by itself:
<?php
$filename = "seppo.txt.bak";
$extension = end(explode(".", $filename)); /* shorter and easier to understand */
echo $extension; // outputs 'bak'
?>