Jump to content

Weird PHP output, Please help


coupe-r

Recommended Posts

Hello All,

 

I have 2 vars that echo the following:

 

$current_rate = 585.00

$amount_paid = 584.99

 

These are both accurate and pulled from the DB.

 

When I do this:

 

$balance = $current_rate - $amount_paid

 

Which is 585.00-584.99

 

The var $balance now equals 0.0099999999999909. 

 

How can that be?

Link to comment
https://forums.phpfreaks.com/topic/204993-weird-php-output-please-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.