当前位置: 代码迷 >> PHP >> smarty?section循环报错
  详细解决方案

smarty?section循环报错

热度:55   发布时间:2016-04-28 17:15:55.0
smarty?section循环出错

......
<{section name=s loop=$tips_infos}>
......
<p><{$smarty.section.index}></p>   
//输出当前循环次数(这里次数没输出,还报错了,不知为啥)
<{if $tips_infos[s].system ne '1'  && ($index=1 || $index=2 ||$index=3 ||$index=4 ||$index=9 ||$index=10 ||$index=11)}>
//$index=循环次数     $tips_infos[s].system ='1' 并且循环次数为1,2,3,4,9,10,11条件才成立  (因为循环次数出错,不知道这里会不会出问题)
<{/section}>
......

------解决思路----------------------
传入的数据是什么?