I'm a newbie, but maybe this'll do it:

if ($str!='0')
{
$str = ltrim($str, '0')
}

>>> Liam Gibbs <[EMAIL PROTECTED]> 05/23/02 01:49PM >>>
> From version 4.1.0, $str = ltrim($str, '0')

This works excellently. Thanks. One problem that I
didn't think of, though: If the number is 0 (only 0),
then the string ends up being empty. Is there a way
around that? I put an if statement in saying if the
string is empty, then the string is 0. Any better way?

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to