RE: [PHP] increment numbers...
| From: | Senani | Date: | Tue, 14 Jan 2003 04:42:58 +0000 |
| Subject: | RE: [PHP] increment numbers... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131513@lists.php.net to get a copy of this message | ||
Hi,
Great! I was searching for this days in PHP DOCS. I can proceed now.Thanks Again folk. JanakAA At 03:30 PM 1/14/2003 +1100, you wrote:
for ($i = 1; $i <= 100; $i++) {echo str_pad($i, 6, '0', STR_PAD_LEFT) . '<br />';} is that the sort of effect you want? -----Original Message----- From: Senani [mailto:senani@sri.lanka.net] Sent: Tuesday, 14 January 2003 3:22 PM To: php-general@lists.php.net Subject: [PHP] increment numbers... HI all,I need help on incrementing numbers starting with a 0 ormore on php-4.2.3.When I increment a number like 00002 (00002++). Its out put is 3( not 00003). But Its output had leading 0s on php-4.0.2. Does anybody know any function or any other simple way to do this. Rgds JanakaA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php