I wonder how can i convert float to …
$x = 12.548544444
$x = 12.55
This can be reduced to a single operation by passing a 2nd argument to the round() function.
$x = 12.548544444;
$x = round($x, 2);
The “2” tells it to round two places past the decimal.
thx very much for helping me
You must be logged in to reply to this topic.