lwter
(lwter)
注册会员

一般会员
UID 28567
精华
0
积分 92
帖子 101
金钱 92 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2004-5-15
状态 离线
|
[广告]: q
m
如何在数组里合并相同的Id?
将
-------------------------------------------------
Array
(
[0] => Array
(
[Id] => 5
[Type] =>
[QuoteId] => 70913003
[OperatorId] => 189
)
[1] => Array
(
[Id] => 2
[Type] => IN
[QuoteId] => 70913001
)
[2] => Array
(
[Id] => 3
[Type] => IN
[QuoteId] => 70913001
)
[3] => Array
(
[Id] => 3
[Type] => IN
[QuoteId] => 70913001
)
[4] => Array
(
[Id] => 4
[Type] => IN
[QuoteId] => 70913002
)
[5] => Array
(
[Id] => 4
[Type] => IN
[QuoteId] => 70913002
)
[6] => Array
(
[Id] => 4
[Type] => IN
[QuoteId] => 70913002
)
[7] => Array
(
[Id] => 4
[Type] => IN
[QuoteId] => 70913002
)
[8] => Array
(
[Id] => 4
[Type] => OUT
[QuoteId] => 70913002
)
[9] => Array
(
[Id] => 3
[Type] => OUT
[QuoteId] => 70913001
)
[10] => Array
(
[Id] => 3
[Type] => OUT
[QuoteId] => 70913001
)
[11] => Array
(
[Id] => 1
[Type] => IN
[QuoteId] => 70910002
)
)
----------------------------------------
变成
----------------------------------------
Array
(
[0] => Array
(
[Id] => 5
[Type] =>
[QuoteId] => 70913003
[OperatorId] => 189
)
[1] => Array
(
[Id] => 2
[Type] => IN
[QuoteId] => 70913001
)
[2] => Array
(
[Id] => 3
[Type] => IN
[QuoteId] => 70913001
)
[3] => Array
(
[Id] => 4
[Type] => IN
[QuoteId] => 70913002
)
[4] => Array
(
[Id] => 1
[Type] => IN
[QuoteId] => 70910002
)
)
|
|