ne

Summary

Returns TRUE if one or more of the parameters do not match.

Usage

input|ne( value1 [, value2 [, ...] ] )

Parameters

NameTypeDescriptionRequired
value1 any A variable/value that should be compared.. Yes.
value2 any Another variable/value that should be compared. Only if the input parameter is omitted.

Returns

TRUE or FALSE (see below).

Description

This operator compares all the provided parameters. If the parameters are not equal, the operator will return TRUE, otherwise FALSE will be returned. If more than one parameter is provided, the operator will ignore the input parameter.

Note that "ne" compares the values in the same way as the '!=' operator in PHP programming language (refer to the PHP reference documentation for more information). It is recommended to use the “compare” template operator for string comparision.

Examples

Example 1

{128|ne( 128 )}

or

{ne( 128, 128 )}

 

Returns FALSE.

Example 2

{128|ne( 256 )}

or

{ne( 128, 256 )}

 

Returns TRUE.

Example 3

{256|ne( 256, 128 )}

Returns TRUE.

Example 4

{ne( 128, 128, 256 )}

Returns TRUE.

Example 5

{ne( 128, 128, 128 )}

Returns FALSE.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.