check if all aray values are in other array 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 all values in array are equal
$allvalues = array('true', 'true', 'true');
if (count(array_unique($allvalues)) === 1 && end($allvalues) === 'true') {
}