title: Foreach loop with multiple element in Twig template engine
body: <p>I'm using Twig as template framework for my PHP web application.</p>
  
  <p>I would like to know if there is a fast way to get many element in a foreach block.</p>
  
  <p>This is my data:</p>
  
  <pre><code>users=&gt;[
   ["name"=&gt;"User1"],
   ["name"=&gt;"User2"],
   ["name"=&gt;"User3"],
   ["name"=&gt;"User4"],
   ["name"=&gt;"User5"],
   ["name"=&gt;"User6"]
  ]
  </code></pre>
  
  <p>This would be a standard loop (each item):</p>
  
  <pre><code>&lt;ul&gt;
      {% for user in users %}
          &lt;li&gt;{{ user.name }}&lt;/li&gt;
      {% endfor %}
  &lt;/ul&gt;
  </code></pre>
  
  <p>But this is what I need in block of <strong>n</strong> elements (in this example <strong>n=3</strong>)</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li&gt;User1&lt;/li&gt;
      &lt;li&gt;User2&lt;/li&gt;
      &lt;li&gt;User3&lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul&gt;
      &lt;li&gt;User4&lt;/li&gt;
      &lt;li&gt;User5&lt;/li&gt;
      &lt;li&gt;User6&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Exists a fast way to do this in Twig or should I prepare the data in a different way with a one more subarray layer?</p>