How to get common values from two different arrays in PHP [closed]

Native PHP functions are faster than trying to build your own algorithm.

$result = array_intersect($array1, $array2);

Leave a Comment