Re: Leading zeroes

From: Date: Thu, 23 May 2002 17:07:43 +0000
Subject: Re: Leading zeroes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98946@lists.php.net to get a copy of this message
> Does anybody have a clever and efficient way of > getting rid of leading zeroes in a string? If the string is completely numeric, you can do something like this: $string = "005847"; $string = (int)$string; Apart from that, you'll have to run it through some sort of regex, I suppose. Chris

« previous php.general (#98946) next »