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

   <?php
$str1_array=array('电影','','http://www','','1654','');
$str1_array=array_filter($str1_array);
print_r($str1_array);
?>

显示结果:
Array
(
[0] => 电影
[2] => http://www
[4] => 1654
)
posted @ 2012-02-03 10:45  skillCoding  阅读(338)  评论(0)    收藏  举报