Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我有以下数组:
$arr[0] = "1" $arr[7] = "p" $arr[10] = "c" $arr[12] = 'k"
如何将其转换为:
$arr[0] = "1" $arr[1] = "p" $arr[2] = "c" $arr[3] = 'k"
像这样:
$arr = array_values($arr);
http://www.php.net/manual/en/function.array-values.php