PHP去除数组中的空值2022-05-04 10:54:37<?php $entry = array( 0 => 'foo', 1 => false, 2 => -1, 3 => null, 4 => '' ); print_r(array_filter($entry)); ?> 输出 Array ( [0] => foo [2] => -1 ) 上一篇:PHP 分割字符串下一篇:PHP 数组去重