Functions:isset

From Dwoo Docs

Jump to: navigation, search

Checks whether a variable is not null

isset(mixed $var)
  • var : variable to check




Example:

{if isset($foo)}SET{else}not set or null{/if}
{$foo=1}
{if isset($foo)}SET{else}not set or null{/if}
{$bar=null}
{if isset($bar)}SET{else}not set or null{/if}

Output:

not set or null
SET
not set or null
Note that doing :
{if $foo}{$foo}{/if}
..is the same as if you used :
{if isset($foo)}{$foo}{/if}
Personal tools
templates
page language

French

The article you want to access doesn't exist in French.
Deutsch
The article you want to access doesn't exist in Deutsch.
Russian
The article you want to access doesn't exist in Russian.