title: Smarty, new row every 4 iteration
body: <p>How can I set in Smarty that every 4 iteration in loop, I'll get new row in table?
  I'm trying something like this:</p>
  
  <pre><code>&lt;table&gt;
      {foreach $arr as $v}
         {counter start=0}
         {if $counter/4 == 0}
             &lt;tr&gt;&lt;td&gt;{$v}&lt;/td&gt;&lt;/tr&gt;
         {else}
             &lt;td&gt;{$v}&lt;/td&gt;
         {/if}
         &lt;td&gt;
      {/foreach}
  &lt;/table&gt;
  </code></pre>
  
  <p>But I understand it's idiotic, I'm stuck, is there a normal way to do that?</p>