I am trying to sort an array by its value:
My array:
<pre>Array
(
[1] => 11250
[2] => 33750
[3] => 56250
[4] => 78750
[5] => 101250
[6] => 123750
[7] => 146250
[1.5] => 22500
[2.5] => 45000
[3.5] => 67500
[4.5] => 90000
[5.5] => 112500
[6.5] => 135000
)
i want to reform it and it should be like:
<pre>Array
(
[1] => 11250
[1.5] => 22500
[2] => 33750
[2.5] => 45000
[3] => 56250
[3.5] => 67500
[4] => 78750
[4.5] => 90000
[5] => 101250
[5.5] => 112500
[6] => 123750
[6.5] => 135000
[7] => 146250
)
I have tried ksort PHP function but it return only 1.I have tried other PHP funcions too but it is not working. can any one guide me how can i achive it please?