Page 1 of 1
decimal point to 2...
Posted: Thu Jun 24, 2004 5:11 am
by kevin7
how to make a value... for example 130.328... to be rounded to 130.33..
tq...
Posted: Thu Jun 24, 2004 5:23 am
by feyd
[php_man]round[/php_man]($num, 2);
Posted: Thu Jun 24, 2004 5:42 am
by kevin7
hmm.... yes... it work...
if i wanna to display 128.8 to 128.80?
really appreaciated!
Posted: Thu Jun 24, 2004 5:51 am
by patrikG
if you'd need it for display only, have a look at [php_man]sprintf[/php_man]
Posted: Thu Jun 24, 2004 7:17 am
by kevin7
ooo... that was C programming~~~
i neva thought it was such useful in PHP too...!
tq anyway~
