Need help in exploding multiple arrays and then use foreach to return data
<p>Here are my <code>variables</code></p>

<pre><code>&lt;?php
    $submenu = array( array("submenu1", "submenu2", "submenu3", "submenu4"),
           array("submenuA", "submenuB", "submenuC", "submenuD"),
           array("submenuI", "submenuII", "submenuIII", "submenuIV")
    );

    $mainmenu="Main1, Main2, Main3";
?&gt;
</code></pre>

<p>The desired <code>output</code> should be:</p>

<pre><code>Main1
 submenu1
 submenu2
 submenu3
 submenu4

Main2
 submenuA
 submenuB
 submenuC
 submenuD

Main3
 submenuI
 submenuII
 submenuIII
 submenuIV
</code></pre>

<p>Thanks!</p>
