函数名:array_filter()
调用方式:array_filter($array)
参数说明:$array 是操作的对象,我们将删除其中的空元素
实例:
<?php $array = ('a' => "abc", 'b' => "bcd",'c' =>"cde",'d' =>"def",'e'=>""); array_filter($array); echo "<pre>"; print_r($array); ?>
结果:
Array ( [a] => abc [b] => bcd [c] => cde [d] => def )