Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

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.

Balazs Halasy (05/02/2004 10:42 am)

Julia Shymova (29/06/2007 10:30 am)

Balazs Halasy, Julia Shymova


Comments

There are no comments.