• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP array question; nevermind I figured it out

jonmullen

Platinum Member
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.
 
Back
Top