Go to: Synopsis. Return value. MEL examples.

Synopsis

string[] stringArrayIntersection(string[] $string1, string[] $string2)

Returns a new string array that contains the items that are common to both arrays. Note: Duplicate strings will only appear once in the output array.

Return value

string[] : Array of strings that both arrays have in common.

Arguments

Variable Name Variable Type Description
$string1string[]First string array.
$string2string[]Second string array.

MEL examples

	string $array1[] = {"item2", "item1", "item3"};
	string $array2[] = {"item5", "item3", "item4"};
	stringArrayIntersection($array1, $array2);
	// Result: item3 //