PHP How to get the file extension April 11, 2014PHPextension, file, pathPF $path = $filename; $ext = pathinfo($path, PATHINFO_EXTENSION); You will get, for example .jpg