$ext = pathinfo($filename, PATHINFO_EXTENSION);
$path ="/some/path/to/myfilename.html"; $ext = pathinfo($path, PATHINFO_EXTENSION);//ext is "html"