0
我想在四次循環後添加新行。我使用{節循環= $ arrProducts名稱=索引} 當執行數組將顯示在一行中的所有產品,但我想添加每四行產品。我能做什麼???如何在smarty模板中循環四次後添加新行
謝謝這段代碼我使用
{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}
謝謝 但你的代碼顯示爲V對齊 – 2010-02-08 14:17:03
所有產品你是什麼意思? – Daff 2010-02-18 23:31:48