RE: [PHP] Leading zeroes

From: Date: Thu, 23 May 2002 17:49:12 +0000
Subject: RE: [PHP] Leading zeroes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98957@lists.php.net to get a copy of this message
> 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

« previous php.general (#98957) next »