Why is PHP outputting decimals with a -E -
i trying round decimal after subtraction:
$decimal = round(0.000300-0.000200,6);
the out put want : 0.0001
but why -1.0e-4 appearing? know means, why displaying way? kind of php setting causing this?
because rounding! not giving format display number. if want display float number 6 digits after point should use php's number_format:
$decimal = round(0.000300-0.000200,6); number_format($decimal,6);
Comments
Post a Comment