The math part works flawless, but I got a problem with the IF statements...
I tried like 7 different ways to write it and none worked.
My most recent try:
Code: Select all
if($filesize <= "500000000") and if($filesize > "999999")
{
$filesizecalc = (round($filesize / 1000) / 1000);
$filesizebyte = "MB";
}
else if($filesize <= "1000000") and if($filesize > "999")
{
$filesizecalc = ($filesize / 1000);
$filesizebyte = "KB";
}Code: Select all
if("999999" <= $filesize <= "500000000")I think I know a way to make it work, but that way is going to be really a pain to read and understand, and also pretty much double the size of the file, and make it messy...
I really appreciate any help, even if you say you don't know
Oh, and sorry for the bad English, I just woke up after a whole night working on this, and my brain is still kinda numb...