array_values $a = [1,2]; unset($a[1]); $a[] = 3; print_r($a); // 输出 [0=>1,2=>3] 转载于:https://www.cnblogs.com/china-flint/p/9637882.html