title: Accessing each chunk of array_chunk
body: <p>I'm pretty new to PHP and am looking into using <a href="http://www.php.net/manual/en/function.array-chunk.php" rel="nofollow noreferrer">array_chunk()</a> to split an array into three parts to display it as a three column list.  Let's say I have an array like this</p>
  
  <pre><code> $input_array = array('a', 'b', 'c', 'd', 'e', 'f');
   $chunks = array_chunk($input_array, 3, true));
  </code></pre>
  
  <p>and I want to output something like:</p>
  
  <pre><code>&lt;div class="left"&gt;
   &lt;ul&gt;
    &lt;li&gt;a&lt;/li&gt;
    &lt;li&gt;b&lt;/li&gt;
   &lt;/ul&gt;
   &lt;/div&gt;
  
  &lt;div class="middle"&gt;
   &lt;ul&gt;
    &lt;li&gt;c&lt;/li&gt;
    &lt;li&gt;d&lt;/li&gt;
   &lt;/ul&gt;
   &lt;/div&gt;
  
  &lt;div class="right"&gt;
   &lt;ul&gt;
    &lt;li&gt;e&lt;/li&gt;
    &lt;li&gt;f&lt;/li&gt;
   &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've seen some <a href="https://stackoverflow.com/questions/9478973/php-list-structure/9479029#9479029">really helpful examples</a> on here but none that show how to foreach loop each chunk of the original array to place where you need within your html/css.</p>
  
  <p>Is this a job for array_slice?  But what if my array is dynamically populated and I don't know how big it will be at a given time?</p>
  
  <p>Thanks!</p>