check if an array contains any element of another array and get ndex code example
Example: check if array values exists in another array
$result = !empty(array_intersect($people, $criminals));
$result = !empty(array_intersect($people, $criminals));