Multi Dimensional Arrays?
| From: | Brandon Orther | Date: | Mon, 07 May 2001 15:59:48 +0000 |
| Subject: | Multi Dimensional Arrays? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-51765@lists.php.net to get a copy of this message | ||
Hello,
I am working on a menu script that I wanted to use multi-dimensional arrays
for.
Here is the conf file I have:
//Main Menu Array
$main_menu[0] = "Menu 1"; //Represents the name of the menu
//Menu 1 Array
$main_menu[0][0] = "Test 1";
$main_menu[0][1] = "Test 2";
$main_menu[0][2] = "Test 3";
$main_menu[0][3] = "Test 4";
When I try to us count like:
$count = count($main_menu[0]);
I only get 1. My question is how do I count a multi dimensional array.
Thanks for the help,
Brandon