Created
August 19, 2014 21:00
-
-
Save bbatsche/000984af5c19d7615057 to your computer and use it in GitHub Desktop.
Todo List Sorting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$items = [ | |
0 => 'first', | |
1 => 'second', | |
2 => 'third' | |
]; | |
// A | |
asort($items); | |
// Z | |
arsort($items); | |
// O - Original | |
ksort($items); | |
// R - Reverse Original | |
krsort($items); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment