johnsmith153 Posted September 29, 2008 Share Posted September 29, 2008 I have $array[0]="jim" $array[1]="john" $array[2]="bob" $array[3]="derek" I want a speedy way to turn it backwards, so I get $array[0]="derek" $array[1]="bob" $array[2]="john" $array[3]="jim" Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/ Share on other sites More sharing options...
Dragen Posted September 29, 2008 Share Posted September 29, 2008 rsort($array) Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653079 Share on other sites More sharing options...
trq Posted September 29, 2008 Share Posted September 29, 2008 rsort(). Its amazing what you find in the manual. Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653081 Share on other sites More sharing options...
johnsmith153 Posted September 29, 2008 Author Share Posted September 29, 2008 A what? Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653089 Share on other sites More sharing options...
Dragen Posted September 29, 2008 Share Posted September 29, 2008 php.net Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653091 Share on other sites More sharing options...
sasa Posted September 29, 2008 Share Posted September 29, 2008 array_reverse(); Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653095 Share on other sites More sharing options...
trq Posted September 29, 2008 Share Posted September 29, 2008 Pfff. Its even more amazing the solutions I post when I don't read the questions properly. Quote Link to comment https://forums.phpfreaks.com/topic/126303-very-simple-reorder-array-backwards/#findComment-653103 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.