RE: [PHP] Sizeof a multi-dimensional array??
| From: | Maxim Maletsky | Date: | Fri, 27 Apr 2001 03:13:20 +0000 |
| Subject: | RE: [PHP] Sizeof a multi-dimensional array?? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50556@lists.php.net to get a copy of this message | ||
it should.
if(is_array($x[0]))
$count = count($x[0]);
else
$count = 'not an array....';
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim@phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Chris Anderson [mailto:chrisderson@ameritech.net]
Sent: Wednesday, April 25, 2001 9:31 AM
To: PHP
Subject: [PHP] Sizeof a multi-dimensional array??
Alright, count($x) would give me the number of array elements in $x. But how
can I get the count of a multi-dimensional array? Count($x[0]) doesn't seem
to work. Thanks in advance
Chris Anderson aka "Null"
--------------------------------------------
PHP Developer / Nulltech
PHP-GTK Tester / gtk.php.net
STA Administrator / www.stronger.org
DOD Co-Owner / www.dayofdefeat.com