smarty section怎么结束循环

解决方案 »

  1.   

    用你定义的开始结束标签啊,默认的是<section></section>,我一般都定义成<{section}><{/section}>
      

  2.   

    始末标记自定义[{   }]tpl页面[{section name=n loop=$user}]  
        [{$user[n].索引名称}]   
    [{/section}]
    php页面include_once("Smarty_config.php"); //包含Smarty配置文件$user[]=array("name"=>"tom","sex"=>"boy");
    $user[]=array("name"=>"Sean","sex"=>"boy");
    $user[]=array("name"=>"kitty","sex"=>"girl");$smarty->assign("user",$user);
    $smarty->display("??.tpl");
      

  3.   

    smarty详细手册:
    II. Smarty For Template Designers->7. Built-in Functions->
    {section},{sectionelse}    .index
        .index_prev
        .index_next
        .iteration
        .first
        .last
        .rownum
        .loop
        .show
        .total