1024){ $size = floor($size / 1024); $sizes[$i] = $size; $i++; } foreach($sizes as $key=>$size){ $subtract = array_key_exists(($key + 1), $sizes) ? $sizes[$key + 1] * 1024 : 0; $sizes[$key] = $sizes[$key] - $subtract . $tags[$key]; } return $full ? implode(', ',array_reverse($sizes)) : $sizes[sizeof($sizes) - 1]; } ?>