If you're looking to strip off just the file extension, you can use
pathinfo() to get that. I don't think it is a documented function, so
use var_dump(pathinfo($var)) to see what it outputs.

Tait Grove wrote:
> 
> How can I strip everything past a certain character in a string?
> 
> i.e.:
> 
> $foo = "test.gif";
> 
> // strip past the .gif
> 
> $foo = "test";
> 
> // again
> 
> $foo2 = "test.jpeg";
> 
> // strip past the .jpeg
> 
> $foo2 = "test";
> 
> Tait

--
Monte Ohrt <[EMAIL PROTECTED]>
http://www.ispi.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to