我有一个数组 -
Array
(
[1] => 10890.000
[2] => 3751.000
[0] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
)
如何重新排序,保持当前值在同一索引下。例如以下 -
Array
(
[0] => 0
[1] => 10890.000
[2] => 3751.000
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
)
我已经尝试过array_values()但它没有返回预期的输出