Scott Fletcher <mailto:[EMAIL PROTECTED]>
    on Wednesday, August 13, 2003 10:27 AM said:

> When I do this calculation, 77 * 2.00 = 154.00 but with PHP, it
> return only "154".  So, how do I set the precision value.

Use the number_format() function. Works just like you want.

echo number_format($myNum,2);

You can read more about it here: http://php.net/number_format.


HTH!

Chris.

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

Reply via email to