get extension of image uploaded in php code example
Example 1: 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
Example 2: php get uploaded file extension
$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);