This should be simple. I want to print numbers with 2 digits in php: ie: 00 01 02 ... 09 10 11 in php I've got for $i=1;$i<=99;$i++{ printf ("%2d", $i); } but I get 1 2 3 ... 9 10 How can I make it print the leading 0's on the 1-9? Thanks, Ben
This should be simple. I want to print numbers with 2 digits in php: ie: 00 01 02 ... 09 10 11 in php I've got for $i=1;$i<=99;$i++{ printf ("%2d", $i); } but I get 1 2 3 ... 9 10 How can I make it print the leading 0's on the 1-9? Thanks, Ben