#strrpos($string, $delimeter) - returns the numeric position of the final occurence of the delimeter in the string.
#substr($string, $position) – returns a partial of the string which starts at the $position being declared
$file_extension = substr($filename, strrpos($filename, “.”));
echo $file_extension