输入banner图图片脚本导航/分类

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

除去数组中的空字符元素

代码如下:


$str1_array=array('本站','','http://www.gxlcms.com','','1654','');
$str1_array=array_filter($str1_array);
print_r($str1_array);
?>


显示结果:

代码如下:


Array
(
[0] => 本站
[2] => http://www.gxlcms.com
[4] => 1654
)

以上就介绍了intentfilter php array_filter除去数组中的空字符元素,包括了intentfilter方面的内容,希望对PHP教程有兴趣的朋友有所帮助。