$var = 1.3; $var = round($var);
returns 1
$var = 1.3; $var = round($var, 2);
returns nothing. how can i round varibales?
1.3 rounded to the nearest whole number is 1. So that is correct. In the second example it wasn't given enough precision to round to two decimal places.
Hope that helps.
Chris King