I have a problem with round and inserting into database. Doing the following and trying to insert $y into Mongo will insert it with multiple decimals (similar to what you see from var_export below).
How can I fix this, as I need to have exactly 2 decimals.
<?php
$y = round(348.78 + 348.78 * 19/100, 2 );
var_dump($y);
var_export ($y);
This is only to display the difference on how it gets inserted into Mongo.
float(415.05)
415.05000000000001