I have prepared an array in php with descending order, converted into json_encode. But in client side, I am getting output in ascending order.
Can anyone please help me how can I send with descending order to client.
Array is like
Array('code' => '1', 'data' => Array('10' => "Test1", '3' => 'Test2', '1' => 'Test3'))
and JSON Output is like
{'code' : '1', 'data' : {'1' : 'Test3', '3' : 'Test2', '10' : 'Test1'}}