$value) { if (is_array($value)) { $haystack[$key] = $this->arrayRemoveEmpty($haystack[$key]); } if (empty($haystack[$key])) { unset($haystack[$key]); } } return $haystack; } return null; } }