欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

$smarty.foreach.foo.iteration

shiping1 的头像
.iteration 
iteration 包含当前循环的执行次数,总是从 1 开始,每执行一次自加 1。 
例如: 
复制代码代码如下:

{* 输出 0|1, 1|2, 2|3, ... 等等 *} 
{foreach from=$myArray item=i name=foo} 
{$smarty.foreach.foo.index}|{$smarty.foreach.foo.iteration}, 
{/foreach} 


来自  http://www.jb51.net/article/22692.htm
普通分类: