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" 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) 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. 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? 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 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(); 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. 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
Archived
This topic is now archived and is closed to further replies.