hi. i have a downloading script and it automatically displays the file size, which is great and all. however, it outputs it as Size: 170.06 MB. I just want it to say 170 MB..
below is the part of the code i think can be edited so it can have no decimals.
#.Fix and format Byte Length.
#----------------------------
if ($totalbytes < pow(2,10)){
$totalsize = "$totalbytes B";
}
if ($totalbytes >= pow(2,10) && $totalbytes < pow(2,20)) {
$totalsize = round($totalbytes / pow(2,10), 2)." KB";
}
if ($totalbytes >= pow(2,20) && $totalbytes < pow(2,30)) {
$totalsize = round($totalbytes / pow(2,20), 2)." MB";
}
if ($totalbytes > pow(2,30)) {
$totalsize = round($totalbytes / pow(2,30), 2)." GB";
}