ArrayContainsNoCase

Returns the position of the first element in the array whose string value contains the substring passed (not case sensitive), or 0 if no such element is found.

ArrayContainsNoCase( haystack, needle )

Returns: Number

Argument Description
haystack
array, required

The array in which to search for the substring

needle
object, required

The substring to search for (not case sensitive)

Examples

words           = [ 'Hello' , 'World' ];
positionOfWorld = ArrayContainsNoCase( words, 'world' ); 
Echo( positionOfWorld ); // outputs 2

See also