note 66442 deleted from function.filesize by bjori

From: Date: Tue, 01 Aug 2006 08:59:30 +0000
Subject: note 66442 deleted from function.filesize by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-115395@lists.php.net to get a copy of this message
Note Submitter: service at dual-creators dot de ---- HiHo! I modified the note of php dot net at alan-smith dot no-ip dot com cause i guess that's might be an endless while clause! <? function resize_bytes($size) { $count = 0; $format = array("B","KB","MB","GB","TB","PB","EB","ZB","YB"); while(($size/1024)>1 && $count<8) { $size=$size/1024; $count++; } $return = number_format($size,0,'','.')." ".$format[$count]; return $return; } ?> Anyway gratz! Nice idea thx ;)

« previous php.notes (#115395) next »