php中如何合并几个二维数组成为一个二维数组
数组1:Array([0]=>Array([name]=>admin1[count1]=>1)[1]=>Array([[name]=>admin2[count1]=>2]...
数组1 : Array ( [0] => Array ( [name] => admin1 [count1] => 1 ) [1] => Array ( [[name] => admin2 [count1] =>2] ) [2] => Array ( [name] => admin3 [count1] => 3 ))
数组2: Array ( [0] => Array ( [name] => admin1 [count2] => 4 ) [1] => Array ( [[name] => admin2 [count2] =>5] ) [2] => Array ( [name] => admin3 [count2] => 6 ))
数组3: Array ( [0] => Array ( [name] => admin1 [count3] => 7 ) [1] => Array ( [[name] => admin2 [count3] =>8] ) [2] => Array ( [name] => admin3 [coun3] => 9 ))
数组4: Array ( [0] => Array ( [name] => admin1 [count4] => 10) [1] => Array ( [[name] => admin2 [count4] =>11] ) [2] => Array ( [name] => admin3 [count4] => 12 ))
合并后的数组如下:
Array ( [0] => Array ( [name] => admin1 [count1] => 1 [count2] => 4 [count3] => 7[count4] => 10) [1] => Array ([name] => admin2 [count1] => 2 [count2] => 5[count3] => 8 [count4] => 11 ) [2] => Array ( [name] => admin3 [count1] =>3[count2] => 6 [count3] => 9 [count4] => 12))
那位大侠会,请帮帮忙 展开
数组2: Array ( [0] => Array ( [name] => admin1 [count2] => 4 ) [1] => Array ( [[name] => admin2 [count2] =>5] ) [2] => Array ( [name] => admin3 [count2] => 6 ))
数组3: Array ( [0] => Array ( [name] => admin1 [count3] => 7 ) [1] => Array ( [[name] => admin2 [count3] =>8] ) [2] => Array ( [name] => admin3 [coun3] => 9 ))
数组4: Array ( [0] => Array ( [name] => admin1 [count4] => 10) [1] => Array ( [[name] => admin2 [count4] =>11] ) [2] => Array ( [name] => admin3 [count4] => 12 ))
合并后的数组如下:
Array ( [0] => Array ( [name] => admin1 [count1] => 1 [count2] => 4 [count3] => 7[count4] => 10) [1] => Array ([name] => admin2 [count1] => 2 [count2] => 5[count3] => 8 [count4] => 11 ) [2] => Array ( [name] => admin3 [count1] =>3[count2] => 6 [count3] => 9 [count4] => 12))
那位大侠会,请帮帮忙 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询