Home > Backend Development > PHP Tutorial > 在smarty中怎么使用恒等于

在smarty中怎么使用恒等于

WBOY
Release: 2016-06-13 13:00:56
Original
924 people have browsed it

在smarty中如何使用恒等于?
我用

<br />
{foreach item=nav from=$navs}<br />
{if $nav.name === $crumbname}<br />
<li class="current"><a href="{$nav.url}">{$nav.name}</a></li><br />
{/if}<br />
<li><a href="{$nav.url}">{$nav.name}</a></li><br />
{/foreach}<br />
Copy after login

没有任何效果。

请问是否===使用不正确?
该如何使用?
------解决方案--------------------
http://www.php100.com/manual/smarty/language.function.if.html
------解决方案--------------------
eq or neq 不就行了么?
------解决方案--------------------
为什么要恒等于,PHP是弱类型语言,设计的时候就不要出现这种问题

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