php array_filter without key preservation

前端 未结 2 1061
闹比i
闹比i 2020-12-29 18:24

if i filter an array with array_filter to eliminate null values, keys are preserved and this generated \"holes\" in the array. Eg:

The filtered version of
           


        
2条回答
提交回复
热议问题