Hello
The function below checks if an element of array is empty. If it's empty, it will return true. But the function doesn't seem to work. Given an array as the following:
Array ( [Answer] => Array ( [9] => 3 [11] => 2 ) [Source] => Array ( [9] => [11] => 2 ) )
function is_array_empty($arr){
foreach ($arr as $key=>$value){
$element=$value;
if (gettype($element) == "array"){
return is_array_empty($element);
}else{
if (empty($value)){
return true;
}
}
}
}
Can someone help me?
Thanks.
Norman