Sort multi-dimensional array by specific key

后端 未结 5 2122
你的背包
你的背包 2020-11-28 15:51

I have an array:

Array (
    [0] => stdClass Object (
        [user_id] => 1
        [ID] => 1
        [user_login] => admin
        [display_nam         


        
5条回答
  •  青春惊慌失措
    2020-11-28 16:26

    Your array looks like the result of a database query. If this is a case, let the database do the sorting: just append ORDER BY display_name to the query.

提交回复
热议问题