亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Ask a question about thinkphp syntax
滿天的星座
滿天的星座 2017-05-17 09:55:51
0
4
605

In the html in thinkphp
I want to determine whether $huodong.id and $vo.xueduanid are equal.

                        xueduanid:{$vo.xueduanid}huodongid:{$huodong.id}
                        
                        

Output xueduanid:1huodongid:1

            <if condition="$vo.xueduanid == $huodong.id">eee</if>

But eee cannot be output like this. Why? They are all 1. They should be equal? Wrong type? The values ??in the database are all int types. .

<if condition="$vo.xueduanid == 1">eee</if>can output eee
<if condition="$huodong.id==1">eee</if> ;can output eee

滿天的星座
滿天的星座

reply all(4)
僅有的幸福

== changed to eq

伊謝爾倫

Use directlyeq

<eq name="vo.xueduanid" value="huodong.id">
相等
<else/>
不等
</eq>
Ty80

<if condition="$vo.xueduanid eq $huodong.id">
equal
<else/>
not equal
</if>

習(xí)慣沉默

Actually, TP’s template engine has a bit of a bug. The above is theoretically correct, but in fact it has to be written as

<if condition="$vo.xueduanid eq $huodong['id']">eee</if>

The latter variable must be written in array form, otherwise an error will occur when converting it into PHP code.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template