Quantcast
Channel: User antpaw - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Sort array by numeric keys

$
0
0

How can I sort this array by array keys?

array(4 => 'four',3 => 'three',2 => 'two',1 => 'one',)

Desired result:

array(1 => 'one',2 => 'two',3 => 'three',4 => 'four',)

Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>