php array_filter除去数组中的空字符元素

  作者:bea

除去数组中的空字符元素 代码如下: <?php $str1_array=array('','','http://','','1654',''); $str1_array=array_filter($str1_array); print_r($str1_array); ?> 显示结果: 代码如下: Array ( [0] => [2] => http:// [4] => 1654 )