rownum

rownum is used to display the current loop iteration, starting with one. It is an alias to iteration, they work identically.

rownum 用于显示循环的次数. 该属性是iteration的别名,两者等同.

Example 7-27. section property rownum
例 7-27. section 的 rownum 属性演示

	{section name=customer loop=$custid}
	{$smarty.section.customer.rownum} id: {$custid[customer]}<br>
	{/section}


	OUTPUT:

	1 id: 1000<br>
	2 id: 1001<br>
	3 id: 1002<br>