is there any way to reorder values in array? for example i have
Array (
"one" => 0,
"tow" => 0,
"three" => 0,
"four" => 8,
"apple" => 4,
"pink" => 3,
);
and convert it to
Array (
"one" => 0,
"tow" => 1,
"three" => 2,
"pink" => 3,
"apple" => 4,
"four" => 5,
);
EDIT:
please notice that "four" has bigger value it should change to 5 and "apple" & "pink" should not change