Stores the most valuable pieces of PHP code you can reuse in different projects many times
Finding the file extention in the file name
function file_extension($filename) { $path_info = pathinfo($filename); return $path_info['extension']; } //Maybe faster: function file_extension($filename) { return end(explode(".", $filename)); }