On 1/15/2012 9:24 PM, Robert Williams wrote:
round() rounds floating point which I suppose includes decimals, but
decimal tends to have a fixed number of decimal places.
On Jan 15, 2012, at 19:00, "Simon J
On 16/01/2012, at 2:48 PM, Chris Payne wrote:
"If the loan amount is $68500.00, the insurace will be based on
$69000.00 as the amount is always rounded up to the next $1000."
The round() function only rounds decimal values. You can use this to emulate rounding to a near power of
ten by dividing, rounding, then multiplying again. i.e. echo "<br>" . round(68500/1000) *
1000 . " ROUNDED";
float *round* ( float $val [, int $precision= 0 [, int $mode=
PHP_ROUND_HALF_UP ]] )