get extension of uploaded file in php code example
Example 1: php get file extension from filename
$ext = pathinfo($filename, PATHINFO_EXTENSION);
Example 2: php get uploaded file extension
$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);