【发布时间】:2015-05-14 00:05:01
【问题描述】:
我想在四次循环后添加新行。我使用 {section loop=$arrProducts name=index} 当执行数组将在一行中显示所有产品但我想每四个产品添加一行。我该怎么办???
感谢我使用的这段代码
{if $arrProducts neq " "}
{section loop=$arrProducts name=index}
<td width="565" align="center" valign="top">
<img src="admin/{$arrProducts[index].image}" width="121" height="90" class="prodImg"/><br>
<span class="prodName">{$arrProducts[index].name}</span><br>
<span class="prodPrice">{$arrProducts[index].price} LE</span><br>
<font class="quality">QTY.</font><input type="text" name="txtorder" size="1" class="txtproduct" /><font class="quality"> Kg</font><br />
</td>
{/section}
{/if}
【问题讨论】: