loop
loop is used to display the last index number that this section looped. This
can be used inside or after the section.
loop 用于显示该循环上一次循环时的索引值. 该值可以用于循环内部或循环结束后.
Example 7-28. section property index
{section name=customer loop=$custid}
{$smarty.section.customer.index} id: {$custid[customer]}<br>
{/section}
There were {$smarty.section.customer.loop} customers shown above.
OUTPUT:
0 id: 1000<br>
1 id: 1001<br>
2 id: 1002<br>
There were 3 customers shown above.
|
|