Page 1 of 1

I need to change the format of the numbers on a page.

Posted: Tue Dec 26, 2006 11:01 am
by amir
Hello,

I need to change the format of the numbers on a page.

for example if the result of a calculation is 3.9 I need to show it as 03.90

23.1 ---> 23.10
0.08 ---> 00.08

and so on.

Any kind of help is much appreciated

Posted: Tue Dec 26, 2006 11:07 am
by RobertGonzalez

Posted: Tue Dec 26, 2006 11:09 am
by Ollie Saunders
look into these...

Code: Select all

ini_set('precision', 2) // http://php.net/manual/en/ini.core.php#ini.precision
number_format()
money_format()
round()

Posted: Tue Dec 26, 2006 12:24 pm
by onion2k
Or sprintf().