Checking to see if one array’s elements are in another array in PHP

You can use array_intersect().

$result = !empty(array_intersect($people, $criminals));

Leave a Comment