Get filename extension
Posted on July 15, 2008, Filled under PHP,
Bookmark it
This snippet can help you to get the extension of a filename:
<?php ... some code here ... // Filename $filename = 'public_html/root/internet.gif'; // Extension $ext = strrchr($filename, "."); echo $ext; // will return ".gif" ?>
