sorting
-
(PHP) Sort array of objects by property value
Sort by predefined order:
-
(PHP) sorting an array on a specific value
Simple way to sort an array with usort on a specific value using a comparator. [php] usort($myArray, function ($a, $b) { return $a[‘foo’] > $b[‘foo’]; }); [/php]