| formatting number such as 000001
|
camilord

msg:3658127 | 1:51 pm on May 24, 2008 (gmt 0) | <?php for ($i = 0; $i < 100; $i++) { echo $i.'<br>'; } ?> instead of 1 2 3 4 5 ... i want the result of 0000001 0000002 0000003 0000004 ... can anybody help? advance thanks..
|
camilord

msg:3658135 | 2:08 pm on May 24, 2008 (gmt 0) | got it.. <?php $x = 122; $y = sprintf("%06d",$x); echo $y; ?>
|
|
|