手册上有:
Foreach-loops also have their own variables that handle foreach properties. These are indicated like so: {$smarty.foreach.foreachname.varname} with foreachname being the name specified as the name attribute of foreach 即:
{foreach name="myForeach" from=$list item=i}
{if $smarty.foreach.myForeach.last}This is the last item.{/if}
{/foreach}
Foreach-loops also have their own variables that handle foreach properties. These are indicated like so: {$smarty.foreach.foreachname.varname} with foreachname being the name specified as the name attribute of foreach 即:
{foreach name="myForeach" from=$list item=i}
{if $smarty.foreach.myForeach.last}This is the last item.{/if}
{/foreach}
你能把你用的这个发给我么?谢谢E-Mail: [email protected]
{$smarty.foreach.foreachname.varname}
中varname是指什么,中文手册上还真没有~看来要去翻E文版了~
Table of Contents目录
iteration
first
last
show
total
都是varname属性~