round to 2 decimal places number with more then 3 decimals php code example
Example 1: php float 2 decimais
$foo = "105";
echo number_format((float)$foo, 2, '.', '');
Example 2: 2 decimal round using php
// using round() function we can roundoff float values in php
$value = 58.24365;
round($value, 2);
//result 58.24
Example 3: php round up
//round up to nearest integer
echo(ceil(0.60) . "<br>");
//result 1