Thread: format numbers
View Single Post
Old 10-03-2002, 11:10 AM   #4 (permalink)
sdeming
Code Monkey
 
Join Date: Jul 2002
Location: Michigan
Posts: 85
sdeming is on a distinguished road
You can use the printf() function just like in C:
PHP Code:
{
  
printf("%02.2d"$number);

Should do exactly what you need.
__________________
Scott
B4 09 BA 09 01 CD 21 CD 20 53 63 6F 74 74 24
sdeming is offline   Reply With Quote