Page 1 of 1

Reducing decimals

Posted: Tue Apr 12, 2005 12:00 pm
by farid
Hi :oops: I hope someone could tell me how could I reduce to 4 decimals the result of a division of two variables.

Thanks y'all!!

<?php

$var1=22;
$var2=40;

echo $tot=$var1/$var2;

?>

Posted: Tue Apr 12, 2005 12:13 pm
by Burrito

Posted: Wed Apr 13, 2005 2:38 am
by CoderGoblin
You may also want to use PHP Function:Round