is_unset
Summary
Returns TRUE if the provided variable is not set (has no value).Usage
is_unset( target )
Parameters
Name | Type | Description | Required |
---|---|---|---|
test | any | The target variable. | Yes. |
Returns
TRUE or FALSE.Description
This operator checks if the target variable is set (has a value). If it is, the operator returns FALSE, otherwise TRUE will be returned.
Examples
Example 1
{def $my_variable=true()} {if is_unset( $my_variable )} Yes. {else} No. {/if}
The following output will be produced: "No.".
Example 2
{def $my_variable=false()} {is_unset( $my_variable )} Yes. {else} No. {/if}
The following output will be produced: "Yes.".
Balazs Halasy (05/02/2004 12:36 pm)
Balazs Halasy (06/05/2005 7:29 am)
Comments
There are no comments.