in two array check value exist or not in arrray in php code example
Example 1: check if array value exists in another array php
$result = !empty(array_intersect($people, $criminals));
Example 2: php check if value exists in multidimensional array
// 1d array
in_array('something', $array);
// 2d array
array_column($multi_array, 'your_column');
/**
0 => ['hi'=>0, 'your_column'=>1, 'hi'=>0, 'your_column'=>3]
will be
[1, 3]
and then you can apply the in_array function on that new array ^
*/