©이 문서에서는PHP 중국어 웹사이트 매뉴얼풀어 주다
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]} {/section} There were {$smarty.section.customer.loop} customers shown above. OUTPUT: 0 id: 1000 1 id: 1001 2 id: 1002 There were 3 customers shown above.