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

在smarty中怎么使用恒等于

WBOY
WBOYOriginal
2016-06-13 13:00:56883browse

在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 />

没有任何效果。

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

Statement:
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