How can I check an array recursively for empty content like this example:
Array ( [product_data] => Array ( [0] => Array
Short circuiting included.
function hasValues($input, $deepCheck = true) { foreach($input as $value) { if(is_array($value) && $deepCheck) { if($this->hasValues($value, $deepCheck)) return true; } elseif(!empty($value) && !is_array($value)) return true; } return false; }