我有这个数组:
Array
(
[0] => Array
(
[id] => new@particip.pl
[challs] =>
)
[1] => Array
(
[id] => new@email.pl
[challs] => 551
)
[2] => Array
(
[id] => new@email.pl
[challs] => 551
)
[3] => Array
(
[id] => new@email.pl
[challs] => 553
)
[4] => Array
(
[id] => new@email.pl
[challs] => 553
)
[5] => Array
(
[id] => info@mail.com
[challs] =>
)
)
如何使它与唯一的电子邮件地址和加入的 challs 一起排列,例如在这种情况下:
Array
(
[0] => Array
(
[id] => new@particip.pl
[challs] =>
)
[1] => Array
(
[id] => new@email.pl
[challs] => 551, 553
)
[2] => Array
(
[id] => info@email.com
[challs] =>
)
)
可以排序,还是我需要做forach inarray?有人知道怎么做吗?