I am trying to create a multidimensional array that I can step through pretty easily with the foreach loop. The problem is I want the array to have an array within another array which is inside the big array. It seems like I should be able to initialize it like so:
1: $navigationbar = array(
2: array("./index.php", "Home", array (
3: array("#", "One"),
4: array("#", "Two"),
5: array("#", "Three")),
6: array("./pictures", "Pictures"),
7: array("./friends.php", "Friends"),
8: array("./links.php", "Links"),
9: array("./guestbook.php", "Guestbook"),
10: array("./contact.php", "Contact Me"));
That however gives a pharse error on line 10.
It workes fine, when I just set the array like:
1: $navigationbar = array(
2: array("./index.php", "Home),
3: array("./pictures", "Pictures"),
4: array("./friends.php", "Friends"),
5: array("./links.php", "Links"),
6: array("./guestbook.php", "Guestbook"),
7: array("./contact.php", "Contact Me"));
If anyone can see what I am doing wrong or has a better idea for who I can set this up than please help me.
1: $navigationbar = array(
2: array("./index.php", "Home", array (
3: array("#", "One"),
4: array("#", "Two"),
5: array("#", "Three")),
6: array("./pictures", "Pictures"),
7: array("./friends.php", "Friends"),
8: array("./links.php", "Links"),
9: array("./guestbook.php", "Guestbook"),
10: array("./contact.php", "Contact Me"));
That however gives a pharse error on line 10.
It workes fine, when I just set the array like:
1: $navigationbar = array(
2: array("./index.php", "Home),
3: array("./pictures", "Pictures"),
4: array("./friends.php", "Friends"),
5: array("./links.php", "Links"),
6: array("./guestbook.php", "Guestbook"),
7: array("./contact.php", "Contact Me"));
If anyone can see what I am doing wrong or has a better idea for who I can set this up than please help me.