Snippet Name: Get file extension
Description: Reliable way to get the file extension- this will print the last part after the last dot.
Comment: (none)
Language: PHP
Highlight Mode: PHP
Last Modified: March 11th, 2009
|
<?PHP
// print the last part after the last dot
$extension = END(EXPLODE('.', $filename));
?>
|