View Full Version : Limit decimal places for double values...

04-08-2004, 06:01 AM
I calcualate a double value and I get a number like "93.255842476" (without qutoes of course). How would I get it to limit the decimal place so it would be "93.25". :confused:

This is possible I do believe but I'm unsure and my searching attempts have failed. :(

04-08-2004, 06:11 AM
$number = 93.255842476;
$numformat = number_format($number, 2);

check out http://us3.php.net/manual/en/function.number-format.php for more info.

04-08-2004, 06:17 AM
Thanks man.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum