I have values pulled from a MySQL database where NULL is in the context of MySQL, if that makes a difference.
I need a way to know if all the values are NULL. What would be the most efficient and effective way of determining if ALL values of an array (as well as the values of the arrays within that array) are NULL?
So basically, search array, if all values are NULL, $flag = true
If i remember well db null fields become empty strings in php so you can use a function like this:
function isEmptyArray($array){
foreach($array as $val)
if((is_array($val) && !isEmptyArray($val))||(!is_array($val) && $val!="")) return false;
return true;
}