In PHP how would i round up the value 22.04496 so that it becomes 22.05? It seems that round(22.04496,2) = 22.04. Should it not be 22.05??
Thanks in advance
I think the best way:
echo ceil(round($value * 100)) / 100;
Example:
$value = 77.4; echo ceil($value * 100) / 100; // 77.41 - WRONG! echo ceil(round($value * 100)) / 100; // 77.4 - OK!