牛骨文教育服务平台(让学习变的简单)

array_filter_empty()

array_filter_empty($arr)

【功能】

过滤数组中值为空的元素。

【参数】

$arr:数组

【用例】

<?php

include "./xiunophp/xiunophp.php";

$arr = array(0, 1, 2, 3, "", FALSE);
$r = array_filter_empty($arr);
print_r($r);

/* 结果:

array(1, 2, 3)

*/

?>