First of all i didnt find similar topic in stackoverflow although there is something from another user but the solution there didnt work for me (ASC/DESC).
I have the following array
Array
(
[4] => 60
[3] => 80
[5] => 20
[2] => 0
[1] => 0
[6] => 30
)
The result must be the following:
Array
(
[1] => 0
[2] => 0
[5] => 20
[6] => 30
[4] => 60
[3] => 80
)
I just tryed to do and become confused.
**
EDIT
**
asort() Doesnt work on this array
$array = array(
4 => 60,
3 => 80,
5 => 20,
1 => 0,
2 => 0,
6 => 30
);
The result of asort is:
Array
(
[2] => 0
[1] => 0
[5] => 20
[6] => 30
[4] => 60
[3] => 80
)
Which is wrong, since the key 2 must be after the key 1
Thank you