How can I increase 0000 by 1 and keep formatting?
Posted
by zx
on Stack Overflow
See other posts from Stack Overflow
or by zx
Published on 2010-04-18T07:12:23Z
Indexed on
2010/04/18
7:33 UTC
Read the original article
Hit count: 238
php
$i=0000;
while($i<=1231)
{
print "$i";
$i++;
}
I want it to display 0001,
0002,
0003,
0004,
but instead it prints:
0,
1,
2
Does anyone know why this isn't working?
Thank you in advance.
© Stack Overflow or respective owner