Documentation
getfileext
usage
string getfileext(string filepath)
paramètres
filepath : the path of the file
retourne
Returns the extension of a file
exemples
$ext = getfileext("/media/pictures/image1.jpg");
if($ext=='jpg'){
echo 'JPG image';
}else{
echo 'Not a JPG image';
}