Home > Article > Backend Development > Judgment status value syntax under thinkphp
In the thinkphp framework we often use status value judgment: but writing this way will cause syntax errors.
<p> <if condition="{$res.status} eq '0'">测试</if></p>
2. Correct writing: Because the "." syntax cannot be used in thinkphp
<if condition="$res['status'] eq 0">测试</if>The
f tag already contains PHP parsing. If you write {} tag parsing in it, an error that does not conform to PHP syntax will be reported.
For more related articles about judging status value syntax under thinkphp, please pay attention to the PHP Chinese website!