多个二维数组怎么整合到一个数组里
程序员文章站
2022-05-04 20:37:19
...
多个二维数组如何整合到一个数组里
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["value"]=> int(535) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["value"]=> int(5) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["value"]=> int(758) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["value"]=> int(10) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["value"]=> int(582) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["value"]=> int(390) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["value"]=> int(473) } }
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["values"]=> int(3588) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["values"]=> int(3177) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["values"]=> int(2946) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["values"]=> int(2419) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["values"]=> int(2287) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["values"]=> int(2251) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["values"]=> int(2474) } }
最后想得到
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["value"]=> int(535) ["values"]=> int(3588) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["value"]=> int(5) ["values"]=> int(3177) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["value"]=> int(758)["values"]=> int(2946) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["value"]=> int(10) ["values"]=> int(2419) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["value"]=> int(582) ["values"]=> int(2287) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["value"]=> int(390) ["values"]=> int(2251) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["value"]=> int(473) ["values"]=> int(2474) } }
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["value"]=> int(535) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["value"]=> int(5) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["value"]=> int(758) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["value"]=> int(10) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["value"]=> int(582) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["value"]=> int(390) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["value"]=> int(473) } }
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["values"]=> int(3588) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["values"]=> int(3177) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["values"]=> int(2946) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["values"]=> int(2419) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["values"]=> int(2287) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["values"]=> int(2251) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["values"]=> int(2474) } }
最后想得到
array(7) {
[0]=> array(2) { ["id"]=> string(6) "201307" ["value"]=> int(535) ["values"]=> int(3588) }
[1]=> array(2) { ["id"]=> string(6) "201306" ["value"]=> int(5) ["values"]=> int(3177) }
[2]=> array(2) { ["id"]=> string(6) "201305" ["value"]=> int(758)["values"]=> int(2946) }
[3]=> array(2) { ["id"]=> string(6) "201304" ["value"]=> int(10) ["values"]=> int(2419) }
[4]=> array(2) { ["id"]=> string(6) "201303" ["value"]=> int(582) ["values"]=> int(2287) }
[5]=> array(2) { ["id"]=> string(6) "201302" ["value"]=> int(390) ["values"]=> int(2251) }
[6]=> array(2) { ["id"]=> string(6) "201301" ["value"]=> int(473) ["values"]=> int(2474) } }
相关文章
相关视频
上一篇: php中双冒号的施用