HBcms是一个用Pear框架+Smarty模板引擎构架的cms项目,欢迎大家参与制作Smarty模板

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.

	输出结果:

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

	There were 3 customers shown above.
这是一份简单的Smarty手册和Smarty教材,熟练掌握Smarty模板,让您做项目事半功倍