Go to: Synopsis. Return value. MEL examples.
int stringArrayContains(string $item, string[] $list)
None
Variable Name | Variable Type | Description |
---|---|---|
$item | string | The string item to search for in the string array. |
$list | string[] | A list of string values. |
string $array1[] = {"item1", "item2", "item1"}; // Result: item1 item2 item1 // int $found = stringArrayContains("item1", $array1); // Result: 1 // $count = stringArrayContains("item2", $array1); // Result: 1 // $count = stringArrayContains("plotz", $array1); // Result: 0 //