title: How Would You Make A Two Column Table With Twig?
body: <p>I can't for the life of me figure out how to add a <code>&lt;/tr&gt;&lt;tr&gt;</code> every OTHER iteration in a Twig loop.</p>
  
  <p>For instance: </p>
  
  <pre><code>$numArray = array(12,13,14,15,16,17,18);
  </code></pre>
  
  <p>Passed to twig, I would loop a table like:</p>
  
  <pre><code>&lt;table&gt;
    {% for num in numArray %}
      &lt;tr&gt;
        &lt;td&gt;
          {{num}}
        &lt;/td&gt;
      &lt;/tr&gt;
    {% endfor %}
  &lt;/table&gt;
  </code></pre>
  
  <p>This would output:</p>
  
  <pre><code>+-----------+
  |    12     |
  +-----------+
  |    13     |
  +-----------+
  |    14     |
  +-----------+
  |    15     |
  +-----------+
  |    16     |
  +-----------+
  |    17     |
  +-----------+
  |    18     |
  +-----------+
  </code></pre>
  
  <p>What I'd like to do is get something like this:</p>
  
  <pre><code>+-----------+-----------+
  |    12     |    13     |
  +-----------+-----------+
  |    14     |    15     |
  +-----------+-----------+
  |    16     |    17     |
  +-----------+-----------+
  |    18     |           |
  +-----------+-----------+
  </code></pre>
  
  <p>But I can't for the life of me figure out a way to alternate my row input with anything that doesn't seem hacky.  Honestly I can't even get hacky to work.  Is there a method for this?  Or, should I be looking to write my own extension?</p>