PHP检查数组的任何键是否为空值

PHP检查数组的任何键是否为空值,php,arrays,validation,Php,Arrays,Validation,我有一个类似的数组 $question = array( 'description'=>'some description', 'answer_one'=>'some answer', 'answer_two' => NULL) 我需要以最快的方式检查此数组的任何键是否包含空值。尝试以下操作: $question = array( 'description'=>'some description', 'answer_one'=>'some answer', 'an

我有一个类似的数组

$question = array(
'description'=>'some description',
'answer_one'=>'some answer',
'answer_two' => NULL)
我需要以最快的方式检查此数组的任何键是否包含空值。

尝试以下操作:

$question = array(
'description'=>'some description',
'answer_one'=>'some answer',
'answer_two' => NULL);

foreach ($question as $key => $value) {
    if ($value == "") {
echo $key . " is empty!";
}

}
,如果(在_数组中(NULL,$question)){}
$key = array_search(null, $question);
if (in_array(NULL, $question)) {

}