get file extension in php code example
Example 1: php get file extension from filename
$ext = pathinfo($filename, PATHINFO_EXTENSION);
Example 2: php file extension
$ext = end(explode(".",file_name));
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$ext = end(explode(".",file_name));