Get Extension of a file 28-12-2015 15:57:16 PHP / Files 0 Bookmark(s) 273 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);