$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.
Try using printf("%04s",$i);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With