RE: [PHP] Numbers with leading zero...

From: Date: Thu, 25 Jul 2002 00:40:23 +0000
Subject: RE: [PHP] Numbers with leading zero...
Groups: php.general 
Request: Send a blank email to php-general+get-109389@lists.php.net to get a copy of this message
you could use: printf("%02d", ++$Num); or if you want to put it back into $Num, use the sprintf() version -----Original Message----- From: vins [mailto:vins@webonline.co.za] Sent: Thursday, July 25, 2002 10:44 AM To: php-general@lists.php.net Subject: [PHP] Numbers with leading zero... Hi. I've got this script that needs to take for examle 02 and increase that to 03. but when i run the script $Num++; it changes 03 to 3; is there not a function that adds leading zeros onto a string ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#109389) next »