I have two arrays in PHP as follows:
People:
Array ( [0] => 3 [1] => 20 )
Wanted Criminals:
That code is invalid as you can only pass variables into language constructs. empty() is a language construct.
empty()
You have to do this in two lines:
$result = array_intersect($people, $criminals); $result = !empty($result);