Jump to content

multi dimensional arrays


ameliabob

Recommended Posts

Do the list and each functions work with multidimensional arrays? $families = array ( "Griffin"=>array ( "Peter", "Lois", "Megan" ), "Quagmire"=>array ( "Glenn", "Fred", "Melissa" ), "Brown"=>array ( "Cleveland", "Loretta", "Junior" ) ); Given this array what would " echo (each($families)); " will display each of the family names.Is there a function that allows me to see the second level? while (list($first,$second,$third) = each($families){ echo("First born is ".$first." next is ".$second);}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...