Custom array sort? asc then desc

Posted on 16th Feb 2014 by admin

Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no idea how...

Each entry is laid out like this: ("$status||$id||$shop||$name||$date")
I want it to sort as $status Ascending, and $id Descending.

The reason I can't order it from the database to begin with, is because the entries come from more than one database. So ID's go into the array as 4 3 2 1, next database 4 3 2 1, and so on

Other forums