Ok, this is what I want to do!
I want to get the free space on my hdd's in GB with 2 decimals, like this = 16.23 GB.
I know this piece of code ain't right, but it's what I've come up with so far...
<?php
//Get free space on drive in bytes
$k = disk_free_space("K:");
//Calculate to GB
$k = $k / 1000000000;
$i = 0;
$i2 = -1;
$check = 0;
//check character after character until . is found
while ( !$check == '.' )
{
$i = $i + 1;
$i2 = $i2 + 1;
$check = substr("$k", "$i2", "$i");
}
//Add the 2 decimals
$i = $i + 2;
$k = substr("$k", 0, $i);
print("K: $k GB");
?>