I have set up a multidimensional array in PHP like this:
$contents = array(
"Header1" => array(
"Section 1" => array (
"Description1",
"Notes1",
),
"Gap" => "Gap",
"Section 2" => array (
"Description2",
"Notes2",
),
"Gap" => "Gap",
"Section 3" => array (
"Description3",
"Notes3",
),
),
);
then I loop through this array as follows:
foreach ($contents as $header => $section) {
foreach ($section as $title => $details) {
echo $title."<br>";
}
}
The output will be:
Section1
Gap
Section2
Section3
Why isn't the second "Gap" showing?
Thanx