smarty 模板中定义变量的方法

{assign var="i" value=0}
{foreach name=simple_tab from=$zhinan_cate key=key item=item}
{if $i}
<small>|</small>
{/if}
{if $item['count']}
{math assign="i" equation="x + y" x=$i y=1}
<span><a title="{$segment_parent}期{$item['title']}" href="%7B%24base_url%7Dpinpaizhinan&t_id=%7B%24item%5B'id'%5D%7D"></a>{$segment_parent}期{$item['title']}</span>
{else}
{assign var="i" value=0}
{/if}
{/foreach}
- 本文标题:smarty 模板中定义变量的方法
- 创建时间:2011-01-21 00:00:00
- 本文链接:posts/fcc4.html
- 版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!