"Baroiller Pierre-Emmanuel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > did you try count($value) and strlen($value) ? > count($value) will give size of an array, and strlen($value) size of a > string ... Actually, count($value) returns the amount of values within the array, not the size of it all. If strlen($value) would be enough for you to determine the amount of bytes, you could use this for an array (note that keys are stored as well and thus take memory):
foreach ($array as $key => $val) { $total_size += strlen($key) + strlen($val); } But I'm really not sure how PHP stores arrays, so I don't know if $total_size is even close to the amount of bytes used for an array. -- [Win2000 | Apache/1.3.23] [PHP/4.2.3 | MySQL/3.23.53] Ivo Fokkema PHP & MySQL programmer Leiden University Medical Centre Netherlands -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php