[resolved] Rounding Numbers
Posted: Fri Jul 28, 2006 12:04 pm
Hi,
Little quick question, I'm kinda pressed for time... My script has a section where it calculates an uptime percentage:
When I output it, its a really long decimal. How can I round it to... lets say, 2 decimal places?
Thanks,
- Jeff
Little quick question, I'm kinda pressed for time... My script has a section where it calculates an uptime percentage:
Code: Select all
$total_uptime_hrs = ($totaltime-$total_dwntime_hrs);
$uptime_percent = ($total_uptime_hrs*100);
$total_uptime_percent = ($uptime_percent/$totaltime);Thanks,
- Jeff