you could try an if statement, if $i is less than 9 print '0' first.

 -munir

>>> Ben Luey <lueyb at gridley.acns.carleton.edu> 07/29/01 22:41 PM >>>
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





_______________________________________________
tclug-list mailing list
tclug-list at mn-linux.org
https://mailman.mn-linux.org/mailman/listinfo/tclug-list