PHP计算二维数组中一维数组相同键名的,键值相加
如以下数组中,另外一维数组是动态的$test=array(0=>array('AblestSong'=>0.36),1=>array('AlennKe'=>0.46),2...
如以下数组中,另外一维数组是动态的
$test=array(
0 => array('Ablest Song' => 0.36),
1 => array ('Alenn Ke' => 0.46),
2 => array( 'Andy T Gu' => 1.31),
3 => array ( 'Candy Tian' => 0.26),
4 => array ('Candy Tian' => 4.93),
5 => array ('Chun Liu' => 1.08),
6 => array ('Earlene Yin' => 5.33),
7 => array ('Guoquan Nie' => 0.08),
8 => array ('Guoquan Nie' => 0.2),
9 => array ('Hillwon Deng' => 0.5),
10 =>array ('Hillwon Deng' => 0.15),
11 =>array ('Honghao shen' => 1.01),
12 => array ('Huaiyu Li' => 0.3),
13 =>array ('Huaiyu Li' => 0.42),
14 =>array ('Ivy WX Chen' => 0.51),
15 => array('Ivy WX Chen' => 0.15),
16 =>array ('Jack J OU' => 0.88),
17 => array ('James W Wei' => 0.38),
18 => array ('Javen Tang' => 0.74),
19 =>array ('Javen Tang' => 0.74),
20 => array ('Kagaya Liao' => 0.22),
21 => array ('Kagaya Liao' => 0.46),
22 =>array('Lily H He' => 1.18),
23 => array('Luckly Wu' => 1.07),
24 =>array ('Manni Huang' => 0.26),
25 => array ('Manni Huang' => 0.23),
26 => array ('Mark Shen' => 0.74),
27 =>array('Mark Shen' => 0.03),
28 =>array('May Zhou' => 0.44),
29 =>array('May Zhou' => 0.44),
30 =>array('May Zhou' => 0.22),
31 =>array('May Zhou' => 0.22),
32 =>array('May Zhou' => 0.51),
33 =>array('Samuel JT Lin' => 0.29),
34 =>array('Samuel JT Lin' => 0.29),
35 =>array('Tariku Deng' => 1.07),
36 =>array('Tariku Deng' => 0.63),
37 =>array('Teddy Wu' => 0.49),
38 =>array('Teddy Wu' => 5.71),
39 => array('TingTing TT Zhang' => 0.98),
40 => array ('TingTing TT Zhang' => 0.73),
41 =>array('Wade Wu' => 0.69),
42 =>array('Wade Wu' => 0.28),
43 =>array('Willian Chen' => 0.95),
44 => array('Yuler Lee' => 0.68),
); 展开
$test=array(
0 => array('Ablest Song' => 0.36),
1 => array ('Alenn Ke' => 0.46),
2 => array( 'Andy T Gu' => 1.31),
3 => array ( 'Candy Tian' => 0.26),
4 => array ('Candy Tian' => 4.93),
5 => array ('Chun Liu' => 1.08),
6 => array ('Earlene Yin' => 5.33),
7 => array ('Guoquan Nie' => 0.08),
8 => array ('Guoquan Nie' => 0.2),
9 => array ('Hillwon Deng' => 0.5),
10 =>array ('Hillwon Deng' => 0.15),
11 =>array ('Honghao shen' => 1.01),
12 => array ('Huaiyu Li' => 0.3),
13 =>array ('Huaiyu Li' => 0.42),
14 =>array ('Ivy WX Chen' => 0.51),
15 => array('Ivy WX Chen' => 0.15),
16 =>array ('Jack J OU' => 0.88),
17 => array ('James W Wei' => 0.38),
18 => array ('Javen Tang' => 0.74),
19 =>array ('Javen Tang' => 0.74),
20 => array ('Kagaya Liao' => 0.22),
21 => array ('Kagaya Liao' => 0.46),
22 =>array('Lily H He' => 1.18),
23 => array('Luckly Wu' => 1.07),
24 =>array ('Manni Huang' => 0.26),
25 => array ('Manni Huang' => 0.23),
26 => array ('Mark Shen' => 0.74),
27 =>array('Mark Shen' => 0.03),
28 =>array('May Zhou' => 0.44),
29 =>array('May Zhou' => 0.44),
30 =>array('May Zhou' => 0.22),
31 =>array('May Zhou' => 0.22),
32 =>array('May Zhou' => 0.51),
33 =>array('Samuel JT Lin' => 0.29),
34 =>array('Samuel JT Lin' => 0.29),
35 =>array('Tariku Deng' => 1.07),
36 =>array('Tariku Deng' => 0.63),
37 =>array('Teddy Wu' => 0.49),
38 =>array('Teddy Wu' => 5.71),
39 => array('TingTing TT Zhang' => 0.98),
40 => array ('TingTing TT Zhang' => 0.73),
41 =>array('Wade Wu' => 0.69),
42 =>array('Wade Wu' => 0.28),
43 =>array('Willian Chen' => 0.95),
44 => array('Yuler Lee' => 0.68),
); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询