Multi level menu with PHP with array
<p>I tried to create an automatic menu but it stop after level1_title.
I tried to include a foreach (apps['apps1'} as $app1)  but it does work.
The datas doesn't appear.</p>

<p>Do you have an idea to resolve this ?
Thank you</p>

<pre><code>&lt;?php
  $cl_box_groups[] = array(
                          'level0_title' =&gt; BOX_HEADING_CONFIGURATION,
                          'level0_class' =&gt; 'fa fa-sun-o',

                          'apps' =&gt; array(
                            array(
                              'level1_title' =&gt; MENU_CONFIGURATION_STORE,
                              'level1_class' =&gt; 'fa fa-sun-o'
                            ),

                            'apps1' =&gt; array (
                              array('level12_title' =&gt; MENU_CONFIGURATION_GENERAL,
                                    'level12_class' =&gt; '',
                                    'level12_link' =&gt; 'configuration.php?gID=1',
                              ),
                              array('level13_title' =&gt; MENU_CONFIGURATION_LEGACY,
                                    'level13_class' =&gt; '',
                                    'level13_link' =&gt; 'configuration.php?gID=25',
                              ),
                            ),
                          ),
                          );

?&gt;

    &lt;div id="menu"&gt;
      &lt;nav&gt;
        &lt;h2&gt;&lt;i class="fa fa-reorder"&gt;&lt;/i&gt;My Menu&lt;/h2&gt;
        &lt;ul&gt;
          &lt;a href="../index.php" target="_blank"&gt;&lt;?php echo HEADER_TITLE_ONLINE_CATALOG; ?&gt;&lt;/a&gt;
&lt;?php
        foreach ($cl_box_groups as $groups) {
?&gt;
           &lt;li&gt;
              &lt;a href="#"&gt;&lt;i class="&lt;?php echo $groups['level0_class']; ?&gt;"&gt;&lt;/i&gt; &lt;?php echo $groups['level0_title'] ;?&gt;&lt;/a&gt;
              &lt;h2&gt;&lt;i class="&lt;?php echo $groups['level0_class']; ?&gt;"&gt;&lt;/i&gt; &lt;?php echo $groups['level0_title'] ;?&gt;&lt;/h2&gt;';
              &lt;ul&gt;
                &lt;h2&gt;&lt;i class="&lt;?php echo $groups['level0_class']; ?&gt;"&gt;&lt;/i&gt; &lt;?php echo $groups['level0_title'] ;?&gt;&lt;/h2&gt;';
&lt;?php
          foreach ($groups['apps'] as $app) {
?&gt;
                  &lt;li&gt;
                    &lt;a href="#"&gt;&lt;i class="&lt;?php echo $groups['level1_class']; ?&gt;"&gt;&lt;/i&gt;&lt;?php echo $app['level1_title']; ?&gt;&lt;/a&gt;
                    &lt;h2&gt;&lt;i class="&lt;?php echo $groups['level1_class']; ?&gt;"&gt;&lt;/i&gt; &lt;?php echo $app['level1_title']; ?&gt;&lt;/h2&gt;
                    &lt;ul&gt;
                    &lt;/ul&gt;
                  &lt;/li&gt;
&lt;?php
          }
?&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
&lt;?php
        }
?&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
    &lt;/div&gt;
</code></pre>