note 19435 added to function.floor
| From: | alhall at jcw dot org | Date: | Wed, 27 Feb 2002 14:17:16 +0000 |
| Subject: | note 19435 added to function.floor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27119@lists.php.net to get a copy of this message | ||
//Using floor() to round decimals.
$original_price=12.72
$discount=$original_price*.40;
$discount=floor(($discount * 100)+.5)/100;
//$discount=5.088
//$discount after floor() = 5.09
--
http://www.php.net/manual/en/function.floor.php
http://master.php.net/manage/user-notes.php?action=edit+19435
http://master.php.net/manage/user-notes.php?action=delete+19435
http://master.php.net/manage/user-notes.php?action=reject+19435