compare
Summary
Compares the contents of two arrays.Usage
input|compare( array )
Parameters
Name | Type | Description | Required |
---|---|---|---|
array | array | The array that should be compared with the input array. | Yes. |
Returns
TRUE if arrays are equal, FALSE if not.Description
This operator compares the contents of two arrays, the input array and an array that is provided as the first (and only) parameter. If the arrays are equal, the operator returns TRUE, otherwise FALSE will be returned.
Examples
Example 1
{array( 1, 2, 3, 4, 5 )|compare( arrray( 1, 2, 3, 4, 5 ))}
Returns TRUE.
Example 2
{array( 1, 2, 3, 4, 5 )|compare( arrray( 5, 4, 3, 2, 1 ))}
Returns TRUE.
Example 3
{array( 1, 2, 3, 4, 5 )|compare( arrray( 1, 2, 4, 3, 3 ))}
Returns FALSE.
Balazs Halasy (05/02/2004 9:30 am)
Julia Shymova (03/08/2007 7:34 am)
Comments
There are no comments.