Need help:
What I want is the number 1099.924343
to become 1100.00
When I do this:
$number=1099.924343;
echo ceil($number);
echo "<br>";
echo round($number,2);
This is the result I get:
1100
1099.92
Please give some suggestion.
you could do
echo number_format( ceil( $number ), 2 );
Read more:
Bad news. 1100
already is 1100.00
. If you want to display a number with additional decimal places than it has, that's a display problem.
printf('%.2f', 1100);
Try just using:
round($number)