contains

returns a boolean value indicating whether a node is a descendant of a specified node

Syntax

contains(node)

Returns

returns (bool) true if array contains the input

Parameters

search (var)

Usage

var data = ["this", "is", "an", "array"];
echo( data.contains("an") );

// this will return 1 (true) because the array contains the value "an".