Rounding issue
| From: | Kevin Ison | Date: | Tue, 29 Jul 2003 21:53:08 +0000 |
| Subject: | Rounding issue | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-157446@lists.php.net to get a copy of this message | ||
I need to know if there is a work around for the following scenerio...
$x = 4.5012412;
echo round($x, 2); // results in 4.5 --- however I want 4.50! I want 2
decimal places!
Is there a way to keep the zero from being dropped? I have not been able to
get the zero to stay there ... I realize this is the interpreters problem
but I need the zero.
thanks in advance
--
Kevin Ison
Charlotte, NC