I am trying to round the double 0.0045. When I call...
echo round($theFloat, 3); I get 0.004, instead of 0.005 which is the expected response.
Here is the code:
$increase = 1.1; $previousPrice = round(0.11 / $increase, 2); $nextPrice = round(0.11 * $increase, 2); $afterCut = round(0.11 * 0.95, 6); $willSend = $afterCut - $previousPrice; echo round($willSend, 3);
var_dump($willSend);and see what you got.