Show Output
Example of Looping Over PHP Multidimensional Array
array( "name" => "Peter Parker", "email" => "peterparker@mail.com", ), "super-man" => array( "name" => "Clark Kent", "email" => "clarkkent@mail.com", ), "iron-man" => array( "name" => "Harry Potter", "email" => "harrypotter@mail.com", ) ); // Printing all the keys and values one by one $keys = array_keys($superheroes); for($i = 0; $i < count($superheroes); $i++) { echo $keys[$i] . "{
"; foreach($superheroes[$keys[$i]] as $key => $value) { echo $key . " : " . $value . "
"; } echo "}
"; } ?>