我必须排列,我想将这两个数组与一个主键 (ID) 合并,我想按字母顺序排列这个 NEW 数组(姓氏字段)
Array (
[0] =>
Array ( [id] => 172
[user_id] => 1217330
[behaviour_action_id] => 97
[state] => accepted
)
[1] =>
Array (
[id] => 173
[user_id] => 1217330
[behaviour_action_id] => 97
[state] => pending
) )
而这个数组
Array (
[1217330 ] =>
Array ( [firstname] => Philip
[lastname] => Audet
[birthdate] => 1995-07-17
[id] => 1217330
)
[232323] =>
Array ( [firstname] => Frédéric
[lastname] => Bouchard-Dubé
[birthdate] => 1995-07-17
[id] => 232323
)
我想拥有这个
[0] =>
Array ( [id] => 172
[user_id] => 1217330
[behaviour_action_id] => 97
[state] => accepted
[firstname] => Philip
[lastname] => Audet
)
[1] =>
Array (
[id] => 173
[user_id] => 1217330
[behaviour_action_id] => 97
[state] => pending
[firstname] => Philip
[lastname] => Audet
) )
我不想有这个数组的生日索引,我只想从第二个数组中获取名字和姓氏。所以我想用 ID(第二个表)计算索引 USER_ID(first_table)。我还想用姓氏按字母顺序排列这个新表(在我的例子中,我不需要按字母顺序排序,但我需要这样做)
有人可以帮助我吗?谢谢谢谢