title: human readable file size
body: <pre><code>function humanFileSize($size)
  {
      if ($size &gt;= 1073741824) {
        $fileSize = round($size / 1024 / 1024 / 1024,1) . 'GB';
      } elseif ($size &gt;= 1048576) {
          $fileSize = round($size / 1024 / 1024,1) . 'MB';
      } elseif($size &gt;= 1024) {
          $fileSize = round($size / 1024,1) . 'KB';
      } else {
          $fileSize = $size . ' bytes';
      }
      return $fileSize;
  }
  </code></pre>
  
  <p>... works great except: I can't manually choose in what format I need to display, say i want to show in MB only whatever the file size is. Currently if its in the GB range, it would only show in GB.</p>
  
  <p>Also, how do I limit the decimal to 2?</p>