RE: [PHP] Math Weirdness
| From: | Jay Blanchard | Date: | Mon, 14 Jul 2008 18:32:36 +0000 |
| Subject: | RE: [PHP] Math Weirdness | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276757@lists.php.net to get a copy of this message | ||
[snip]
What makes you think the problem is in this code? How about doing the
following right before the block of code you've provided so that we can
actually check the data with what you're using:
<?php
echo '$acct["BALANCE"]: '.$acct["BALANCE"]."\n";
echo '$adjBalance: '.$adjBalance."\n";
echo '$intlLDCharges: '.$intlLDCharges."\n";
echo '$longDistance: '.$longDistance."\n";
echo '$smsCharges: '.$smsCharges."\n";
echo '$roaming: '.$roaming."\n";
echo '$daCharges: '.$daCharges."\n";
echo '$totalData: '.$totalData."\n";
echo '$endingBal: '.$endingBal."\n";
?>
[/snip]
$adjBalance: 0
$intlLDCharges: 0.2
$longDistance: 0
$smsCharges: 0
$roaming: 0
$daCharges: 0
$totalData: 0
$endingBal: 0.1
I had done this looking for special characters or negative signs.