note 71041 deleted from function.round by bobby
| From: | bobby@php.net | Date: | Thu, 09 Nov 2006 15:25:12 +0000 |
| Subject: | note 71041 deleted from function.round by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119554@lists.php.net to get a copy of this message | ||
Note Submitter: vandall at taaj dot pl
----
Ok so in order to round with precission (2) do the following :
<?php
/** some of this two will give us bad number... */
echo round(9.995,2);
echo round(2457.995,2);
/** this should work */
echo round(9.995*100/100,2);
echo round(2457.995*100/100,2);
?>