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