Hi..
I encountered problem in rounding of numbers into two decimal places.
here is my sample code:
for example from this:PHP Code:if($W4_STATUS == 1 AND $DEPENDENTS == 0 AND $TotEarn >= 7917 AND $TotEarn <= 12500) {
$TAX = ($TotEarn - 7917);
$TAX = (937.50 + ($TAX * .25));
$TAX = number_format($TAX, 2, '.', '');
}
the output is: 1417.615PHP Code:$TAX = ($TotEarn - 7917);
$TAX = (937.50 + ($TAX * .25));
using this:
the output was : 1417.61PHP Code:$TAX = number_format($TAX, 2, '.', '');
but it should be : 1417.62
Thank you


Reply With Quote

Bookmarks