If you want convert totaly the filename to lower case use:
$filename = strtolower($filename);
If you want convert only the extension, use:
$extension = ereg(".[A-Z]|[0-9]{1,}$",$filename);
$filename = ereg_replace($extension,strtolower($extension),$filename);
Can any one help you with these regular expression?
Good lucky