[snip]
    Wondering if there is any similiar function to a php
number_format().
This time, without a period.  For example, if I get a '1', I would like
to
format it to be '01' in two digit.
[/snip]

Ooh, ooh, me, me!

Make sure that the number is a string.

$number = 1;
settype($number, "string");
Test to make sure string length is 1 (becuase you don't want number like
012)

if(strlen($number)== 1){
        $newNumber = "0".$number;
}

echo"$newNumber\n";

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to