Array
(
[id] => 198
[0] => Array
(
[okey] => 0
)
[1] => Array
(
[okey] => 1
)
[2] => Array
(
[okey] => 1
)
)
$result = empty(array_filter($array, function($v){
return is_array($v) && isset($v['okey']) && $v['okey'] !== 1;
})) ? true : false;
function checkArrayOkey($array){
$result = true;
if(is_array($array)){
foreach($array as $value){
if(is_array($value) && isset($value['okey']) && intval($value['okey']) != 1){
$result = false;
break;
}
}
return $result;
}
}