Sort PHPActiveRecord array of objects alphabetically
-
17-03-2021 - |
Question
How can I sort a PHPActiveRecord
array alphabetically?
La solution
Well i ended up getting the array already ordered with phpactiverecord and order_by:
$books = Book::find('all', array('order' => 'title_en asc'));
and it sort of works...
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow