Hello, can anyone tell me the best way to strip off the file extention. Several reasons, firstly so that my edit form page will not show the .jpg in the image name field and secondly so that I can use this name as the image name to create javascript rollovers since all the image names are unique.
Thanks, jeff
Use eregi_replace(); Quick example:
$filename = "mufins.jPg";
$newfile = eregi_replace("..*$","",$filename);
echo $newfile;
// returns mufins
Have fun.