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

WBOY
Release: 2016-06-13 12:57:51
Original
921 people have browsed it

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 />
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template