Answer the question
In order to leave comments, you need to log in
How to remove extra iteration in Smarty loop?
Good day to all. The crux of the matter is as follows. There is an array and I bypass it in a foreach loop.
To add tr I use " is div by ".
{foreach key=key name=goods_name item=c from=$goods}
<tr>
<td>{$c.name}</td>
{if $smarty.foreach.goods_name.iteration is div by 4}
</tr><tr>
{/if}
</tr>
{/foreach}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question