This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

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 11:42 am)

Julia Shymova (29/06/2007 12:30 pm)

Balazs Halasy, Julia Shymova


Comments

There are no comments.