Saturday, July 4th, 2009

Archive for July, 2008

Get filename extension

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”
?>

Read more