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:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 10:44 AM To: [EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php