I am having some problems with the way PHP and javascript round numbers. I am using PHP\'s round function and this javascript function:
It is because the different precisions used in JS (by the browser) and PHP or actually how many bits are used to store the numbers.
you can make your JS rounding function do this to round to the 2nd digit Math.round(floatNumber*100)/100
Math.round(floatNumber*100)/100