array_intersection

The intersection of two arrays: is the set of all elements of A that also belong to B (or vice versa).

Example:

Array1: { 1, 2, 3, 4, 5 ,9}

Array2: { 4, 5, 6, 7, 8, 9, 10 }

The intersection of given two arrays: { 4, 5 }. Because elements 4 and 5 are common in both the arrays.