xxxxxxxxxx
$image_name = $_FILES['image']['name'];
$ext = explode('.',$image_name);
xxxxxxxxxx
//get image extension of uploaded file in php
$imagetype = $_FILES['image']['name'];
$ext = pathinfo($imagetype, PATHINFO_EXTENSION);// get file extension