php - 根据属性值排序

https://stackoverflow.com/questions/4282413/sort-array-of-objects-by-object-fields
 
usort($rows, function ($a, $b) {
return $a["last_message"]["time"] > $b["last_message"]["time"];
});
posted @ 2019-01-02 11:53  德丽莎·阿波卡利斯  阅读(107)  评论(0编辑  收藏  举报