note 21038 added to function.count
| From: | webmaster at NOSPAMtrafficg dot com | Date: | Fri, 26 Apr 2002 07:48:30 +0000 |
| Subject: | note 21038 added to function.count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-29865@lists.php.net to get a copy of this message | ||
Counting a multi-dimentional array
test array
$settings[0][0] = 128;
$settings[0][1] = 256;
$settings[0][2] = 384;
$settings[0][3] = 512;
$settings[0][4] = 1024;
$settings[0][5] = 2048;
$settings[1][0] = 1024;
$settings[1][1] = 2048;
$settings[1][2] = 3072;
$settings[1][3] = 4096;
count($settings) // returns 2
count($settings[0]) // returns 6
count($settings[1]) // returns 4
--
http://www.php.net/manual/en/function.count.php
http://master.php.net/manage/user-notes.php?action=edit+21038
http://master.php.net/manage/user-notes.php?action=delete+21038
http://master.php.net/manage/user-notes.php?action=reject+21038