title: Output multidimensional array into 3 columns div and ul li in php
body: <p>Here's an array : what I am trying to split the array into 3 column of divs with first array should be wrapped into a h3 tag then a other arrays should be displayed in an unordered list.</p>
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [label_01] =&gt; heading 01:
              [label_02] =&gt; heading 02: 
              [label_03] =&gt; heading 03: 
          )
  
      [1] =&gt; Array
          (
              [label_01] =&gt; item 01
              [label_02] =&gt; item 02
              [label_03] =&gt; item 03
          )
  
      [2] =&gt; Array
          (
              [label_01] =&gt; item 001
              [label_02] =&gt; item 002
              [label_03] =&gt; item 003
          )
  
  )
  </code></pre>
  <p>It should output like this</p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-lg-4&quot;&gt;
          &lt;h3 class=&quot;text-primary text-center&quot;&gt;heading 01:&lt;/h3&gt;
          &lt;ul class=&quot;list-box&quot;&gt;
              &lt;li class=&quot;bg-primary text-white&quot;&gt;item 01&lt;/li&gt;
              &lt;li class=&quot;bg-primary text-white&quot;&gt;item 001&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-lg-4&quot;&gt;
          &lt;h3 class=&quot;text-warning text-center&quot;&gt;heading 02:&lt;/h3&gt;
          &lt;ul class=&quot;list-box&quot;&gt;
              &lt;li class=&quot;bg-warning text-white&quot;&gt;item 02&lt;/li&gt;
              &lt;li class=&quot;bg-warning text-white&quot;&gt;item 002&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-lg-4&quot;&gt;
          &lt;h3 class=&quot;text-blue text-center&quot;&gt;heading 03:&lt;/h3&gt;
          &lt;ul class=&quot;list-box&quot;&gt;
              &lt;li class=&quot;bg-blue text-white&quot;&gt;item 03&lt;/li&gt;
              &lt;li class=&quot;bg-blue text-white&quot;&gt;item 003&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I've tried so far</p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
      &lt;?php 
      $keys = array_keys($columns);
      for($i = 0; $i &lt; count($columns); $i++) { ?&gt;
          &lt;div class=&quot;col-lg-4&quot;&gt;
      &lt;?php foreach($columns[$keys[$i]] as $key =&gt; $value) { ?&gt;
              &lt;li class=&quot;bg-primary text-white&quot;&gt;&lt;?php echo $value; ?&gt;&lt;/li&gt;
      &lt;?php } ?&gt;
          &lt;/div&gt;
      &lt;?php } ?&gt;
  &lt;/div&gt;
                  &lt;/div&gt;
              &lt;?php } ?&gt;
              &lt;/div&gt;
  </code></pre>
  <p>and this</p>
  <pre><code>&lt;div class=&quot;row&quot;&gt;
      &lt;?php foreach ( $columns as $column ) { ?&gt;
      &lt;div class=&quot;col-lg-4&quot;&gt;
              &lt;h3 class=&quot;text-primary text-center&quot;&gt;Inspire: Self Leadership&lt;/h3&gt;
              &lt;ul class=&quot;list-box&quot;&gt;
          &lt;?php foreach ($column as $val) { ?&gt;
          &lt;li class=&quot;bg-primary text-white&quot;&gt;&lt;?php echo $val; ?&gt;&lt;/li&gt;
          
          &lt;?php } ?&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;?php } ?&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Any help will be greatly appreciated! Thank you in advance!</p>