PDA

View Full Version : How To Translate Numbers.


ibeblunt
Wed 14th Feb '01, 9:21pm
Wrote me a little php script to find out how much space is available on my hard drive:

<?php
$available = diskfreespace("/");
echo number_format($available);
?>

The result is:

5,175,431,168

If I'm correct this is 5GB. How do I translate the number to something like "5.1" so I can just look at it at a glance?

Mike Sullivan
Thu 15th Feb '01, 12:13am
Umm... divide :)

ibeblunt
Thu 15th Feb '01, 10:20am
I don't get it...

ibeblunt
Tue 27th Feb '01, 11:21am
I got it now.

Thanks!