过滤数组中的空数组array

    xiaoxiao2021-03-25  82

    array_filter()

    手册查询array_filter()的使用细节时,看到了:If no callback is supplied, all entries of input equal to FALSE (see converting to boolean) will be removed. 如果没有给出回调函数,所有的等于 FALSE 的元素将会被移除掉! 刚好可以用来移除数组中的空元素! 使用:$arr = array_filter($arr);
    转载请注明原文地址: https://ju.6miu.com/read-12659.html

    最新回复(0)