开发者

{if not isset} Smarty

开发者 https://www.devze.com 2023-03-05 02:16 出处:网络
what is the code for smarty for if (!isset($var)){ ? if using {if $x eq \'5\'} when $x is not defined in smarty , it gives an error function call \'get_template_vars\' is unknown or deprecated. . thi

what is the code for smarty for if (!isset($var)){ ?

if using {if $x eq '5'} when $x is not defined in smarty , it gives an error function call 'get_template_vars' is unknown or deprecated. . this is what i believe so far as i lost hope in开发者_如何学JAVA trying to know where did this error come from !

Thanky you .


{if ! isset($var)}
body must be at least 30 characters. :)
{/if}


Try this.

{if $missing_var|default:FALSE}
NOT MISSING
{else}
MISSING
{/if}


Try This

{if $var}
   Active
{else}
   Inactive
{/if}
0

精彩评论

暂无评论...
验证码 换一张
取 消