php get file extension from url string
snippet in php

php get file extension from url string

user4774

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