Thursday, June 05, 2008

How to output a number with leading zero's?

Simple:

$number = 15;
printf("%05d", $number);

No comments: