PHP » array_intersect
Computes the intersection of arrays
array_intersect_assoc() - Computes the intersection of arrays with additional index check array_diff() - Computes the difference of arrays array_diff_assoc() - Computes the difference of arrays with additional index check
| Parameters | Description |
|---|---|
| array1 | The array with master values to check. |
| array2 | An array to compare values against. |
| array | A variable list of arrays to compare. |
Return Value: Returns an array containing all of the values in array1 whose values exist in all of the parameters.


