我有一个关联数组:$csv_arr
Array
(
[0] => Array
(
[Enfalac] => alpha linolenic acid 300 mg
[Enfapro] => alpha linolenic acid 200 mg
)
[1] => Array
(
[Enfalac] => arachidonic acid 170 mg
[Enfapro] =>
)
[2] => Array
(
[Enfalac] =>
[Enfapro] =>
)
[3] => Array
(
[Enfalac] => calcium 410 mg
[Enfapro] => calcium 550 mg
)
)
如何删除所有完全空的条目,例如$csv_arr[2]
但保留部分条目,例如$csv_arr[1]
我已经尝试过$csv_arr = array_filter(array_map('array_filter', $csv_arr));
,但这会删除空元素:$csv_arr[1]['Enfapro']
谢谢