I need to remove empty entries on multilevel arrays. For now I can remove entries with empty sub-arrays, but not empty arrays... confused, so do I... I think the code will h
My function:
function removeEmptyItems($item) { if (is_array($item)) { $item = array_filter($item, 'removeEmptyItems'); } return !empty($item); } $nonEmpty = array_filter($raw, 'removeEmptyItems');