Precision value in PHP??

From: Date: Wed, 13 Aug 2003 17:27:03 +0000
Subject: Precision value in PHP??
Groups: php.general 
Request: Send a blank email to php-general+get-159456@lists.php.net to get a copy of this message
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. I looked up on PHP.net and it once mentioned about BC Math but I'm not looking forward to recompiling PHP and Apache with the prefix option to enable the BC Math. There have to be a function somewhere that I can set the decimal places in the numbers. Like .... --snip-- echo whateverFunction("154",2); --snip-- Then I would get 154.00 in responses.

« previous php.general (#159456) next »