Home > Backend Development > PHP Tutorial > ThinkPHP里面的Volist标签 嵌套不了if标签吗?

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

WBOY
Release: 2016-06-23 13:46:00
Original
963 people have browsed it

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

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


回复讨论(解决方案)

我也是 $vo.ac_id 死也出不来。。

应该是 $vo 作用不到 condition 里面
改成 eq 标签试试

我也是 $vo.ac_id 死也出不来。。



用IF  果断死活出不来,不过 用eq却可以了,用eq吧



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