I have a simple calculation, which results in 110, but when i use ceil on the result i get 111, is there something hidden in the result variable?
code:
$result = 66/(100-40)*100;
echo "Result: $result | with Ceil: ". ceil($result);
update: i found a solution here: http://stackoverflow.com/questions/7...ith-no-decimal
$result = round($result,2 ); // does the trick
code:
$result = 66/(100-40)*100;
echo "Result: $result | with Ceil: ". ceil($result);
update: i found a solution here: http://stackoverflow.com/questions/7...ith-no-decimal
$result = round($result,2 ); // does the trick
Comment