{:dump($key)}
<volist name="vdv.sub" id="vdv_v2" offset="$key" length="2">
{:dump('rrrrrrrrrrrrrrrrrr')}
</volist>
</volist>
在解析后的缓存文件中我找到了对应的代码:
<?php if(is_array($vdv["sub"])): $i = 0; $__LIST__ = $vdv["sub"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vdv_v): $mod = ($i % 2 );++$i; echo dump($key);?>
<?php if(is_array($vdv["sub"])): $i = 0; $__LIST__ = array_slice($vdv["sub"],$key,2,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vdv_v2): $mod = ($i % 2 );++$i; echo dump('rrrrrrrrrrrrrrrrrr');?>
</tr><?php endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
额 被包含的volist继承了外部volist的取模判断导致,该嵌套循环不能使用!
求解决方式!
我现在已经跳过模板引擎自己写了PHP语句解决该问题,有没有人看一下这个问题的最终解决方案!
最佳答案