Re: Numbers with leading zero...
| From: | Tom Rogers | Date: | Thu, 25 Jul 2002 01:12:05 +0000 |
| Subject: | Re: Numbers with leading zero... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-109391@lists.php.net to get a copy of this message | ||
Hi,
Thursday, July 25, 2002, 10:44:00 AM, you wrote:
v> Hi.
v> I've got this script that needs to take for examle 02 and increase that to
v> 03.
v> but when i run the script $Num++; it changes 03 to 3;
v> is there not a function that adds leading zeros onto a string ?
have a look at the sprintf() function for full info:
sprintf("value = %02d", $value);
--
Best regards,
Tom