maxvee8
03-17-2008, 01:01 AM
how would i make the recurring number to 2 decimal places eg . 1.33 or even 0 decimal places eg 1
Image to see problem http://img357.imageshack.us/img357/6929/recurerrortl7.jpg
$burgans08 = (($burg08 / $burg07) * 100)-100;
$stabans08 = (($stab08 / $stab07) * 100)-100;
echo "<div class='answercont'>";
if($burgans08<0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Decrease in burglary since 2007</div>";
}
if($burgans08>0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Rise in burglary since 2007</div>";
}
if($burgans08==0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Burglary is the same since 2007</div>";
}
$burgans08
$stabans08
those variable are givind me the answer to the equation so how would i format the answer to 2 decimal places eg . 1.33 or even 0 decimal places eg 1
Max
Image to see problem http://img357.imageshack.us/img357/6929/recurerrortl7.jpg
$burgans08 = (($burg08 / $burg07) * 100)-100;
$stabans08 = (($stab08 / $stab07) * 100)-100;
echo "<div class='answercont'>";
if($burgans08<0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Decrease in burglary since 2007</div>";
}
if($burgans08>0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Rise in burglary since 2007</div>";
}
if($burgans08==0){
echo "<div id='ansburg08'><b>" .$burgans08. "%</b> Burglary is the same since 2007</div>";
}
$burgans08
$stabans08
those variable are givind me the answer to the equation so how would i format the answer to 2 decimal places eg . 1.33 or even 0 decimal places eg 1
Max