--- Mike Migurski <[EMAIL PROTECTED]> wrote:
> > Anyone know what is the php function for finding the length of the
> > array? I haven't found the answer at
> > http://us3.php.net/manual/en/ref.array.php .
> 
> You are aware that all the available array functions are listed about
> halfway down that page, right?

To answer the original question, what do you mean by length? That's a bit
ambiguous. So, I'll take a guess.

If you mean the length of each element of the array, and it's a
one-dimensional array, you can use a combination of implode() and
strlen():

<?
$foo[] = '1';
$foo[] = '22';
$foo[] = '333';
 
echo strlen(implode($foo));
?>

This outputs 6, the length of 122333.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to