首先上数组
Array
(
[0] => Array
(
[tid] => 12
[aid] => 1
[openid] => oWWUP0dieOLSHl3CzjyHIcIsadhtVo
[nickname] => 帅锅你好帅
[sales] =>
[team_name] => 帅
[team_slogan] => 酷
[title] => 测试活动
[new] => Array
(
[0] => Array
(
[id] => 1
[openid] => oWWUP0dieOLSHl3CzjyHIcIsadhtVo
[nickname] => 帅锅你好帅
[tid] => 12
[cre_time] => 1512704950
[aid] => 0
[sales] => 12
)
[1] => Array
(
[id] => 3
[openid] => oWWUP0UXRfKKA6imX_X-6OU7OKv0
[nickname] => landy
[tid] => 12
[cre_time] => 1512704975
[aid] => 0
[sales] => 54
)
)
)
[1] => Array
(
[tid] => 13
[aid] => 2
[openid] => oWWUP0dieOLSHl3CzjyHIcIsadhtVo
[nickname] => 帅锅你好帅
[sales] =>
[team_name] => 帅
[team_slogan] => 酷
[title] => 测按时
[new] => Array
(
[0] => Array
(
[id] => 2
[openid] => oWWUP0dieOLSHl3CzjyHIcIsadhtVo
[nickname] => 帅锅你好帅
[tid] => 13
[cre_time] => 1512704970
[aid] => 2
[sales] => 24
)
)
)
)
我想计算
[0][new][sales]的总和
[1][new][sales]的总和
我不知道数组到底会有多大的....所以.....
我就知道我需要..new 下 tid 相同的话,sales 求和
求大家帮帮忙吧!~~我菜鸟...
?!
慕的地6264312
拉风的咖菲猫