Array Intersection

Find common elements that exist in both arrays.

Code

General
array_values(array_intersect($arr1, $arr2));

Parameters

First array

Second array

Server

More PHP Snippets