brokaddr - 7:03 pm on Mar 14, 2012 (gmt 0)
I sincerely appreciate the replies! I've spent the better part of the past several days racking my brain and researching why this was happening.
After seeing your guys' posts & that this is a known issue, I figured out how to import these fees into my db, rather than calculate on the fly. (No longer 2.9900, but 2.99 now) - unfortunately, I still ran into the same miscalculation issue!
Then I took lostdreamer's advice and re-ordered my sum() and round() - the numbers are now exact. :)
On a related note, does number_format($var,2) have the same "float" issue, or is this strictly a way to add commas and decimals into the correct spaces?
(I'm extremely new to php currency/math calculations; until now I've only ever done typical scripting & database-related stuff - so I apologize if that's a ridiculous question)