Home  >  Article  >  Backend Development  >  ThinkPHP里头的Volist标签 嵌套不了if标签吗

ThinkPHP里头的Volist标签 嵌套不了if标签吗

WBOY
WBOYOriginal
2016-06-13 11:09:52780browse

ThinkPHP里面的Volist标签 嵌套不了if标签吗?
代码如下,却怎么也遍历不出来,分配的变量确定无误,撤掉if标签则可以正确遍历,如果加上了if标签却无论如何都变量不出数据来

<br /><select name="ac_path"><br />	<volist name="cate" id="vo">	<br />	<if condition="$vo.ac_id eq $Think.get.id"><br />	<option value="{$vo.bpath}" >{$vo.count|str_repeat='    ',###}{$vo.ac_name} </option><br />	</if><br />	</volist><br /></select><br />

------解决方案--------------------
我也是 $vo.ac_id 死也出不来。。
------解决方案--------------------
应该是 $vo 作用不到 condition 里面
改成 eq 标签试试

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn