try basename(). then just cut the extention with substr($string, 0, -4) (-4 if the extention is 4 characters i.e. .gif)
Regards Ulf "Micah Montoy" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Anyone have a sure way of grabbing just the file name from a string that > looks like this: > > C:/Documents and Settings/Bobo the Bugbear/My Documents/My Pictures/1.gif > > I would like to pull off, just the name "1.gif" or even better just "1" > without the extension. > > I've been working on: > > $filevalue = str_replace("\\\\", "/", $filevalue); > > $parts = explode("/",$filevalue); > $file_name = $parts[count($parts)]; > > but with no luck. > > thanks > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php