Question

How can I sort a PHPActiveRecord array alphabetically?

Était-ce utile?

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
scroll top