I have one array like this:
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
)
And i want to sort array like first all the 0 value key index find and and using this key value index find in array like 0 value key index is 1,7,19,24 and now 1,7,19,24 value find in array and corresponding key is get and at last all the key sequence is get in new array. is it possible?