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
I think this should solve your problem.
$retArray =array_filter($array, arrayFilter); function arrayFilter($array) { if(!empty($array)) { return array_filter($array); } }