get_ext
get_ext($path); - this function is used to get the file extension (file type)
the input Function accepts parameters:
$path – path to the file to get the extension for (string). It can be either absolute or relative (relative to the script folder).
After testing, the function returns the result of its work to the script :
name – extension of the specified file (string) false – there is no such file (boolean)