我有一个这样的数组:
Array
(
[1] => 0
[2] => 1
[4] => 1
[5] => 4
[6] => 2
[7] => 0
[8] => 2
[9] => 7
[10] => 2
[11] => 2
[12] => 2
[17] => 12
[18] => 17
[19] => 0
[20] => 19
[21] => 20
[22] => 20
[23] => 20
[24] => 0
)
我想对数组进行排序,首先找到所有 0 值键索引,然后使用这个键值索引在数组中查找,比如 0 值键索引是 1,7,19,24,现在找到 1,7,19,24 值数组和对应的键被获取,最后所有的键序列都被获取到新的数组中。可能吗?