Get Extension of a file 29-12-2015 15:49:02 PHP / Files 0 Bookmark(s) 236 View(s) $path = $_FILES['image']['name']; $ext = pathinfo($path, PATHINFO_EXTENSION); If you want to use string functions only: $ext = substr($filename, strrpos($filename, '.')+1);