you can also make use of the basename() function's second
parameter:
<?PHP
$fpath =
"/blah/file.name.has.lots.of.dots.ext";
$fext =
array_pop(explode('.', $fpath));
$fname = basename($fpath,
'.'.$fext);
print "fpath: $fpath\n
";
print
"fext: $fext\n
";
print "fname:
$fname\n
";
?>