二维数组依据键值相加
程序员文章站
2022-04-17 22:19:19
...
二维数组根据键值相加
怎样根据每一个数组的键值相加?
Array
(
[0] => Array
(
[reg] => 0
[regs] => 0
[login] => 7
[pay] => 0
[buy] => 4
[payment] => 11334.00
[recharge] => 1
[rechargea] => 3600.00
)
[1] => Array
(
[reg] => 1
[regs] => 0
[login] => 22
[pay] => 0
[buy] => 0
[payment] => 0.00
[recharge] => 0
[rechargea] => 0.00
)
[2] => Array
(
[reg] => 0
[regs] => 0
[login] => 5
[pay] => 0
[buy] => 1
[payment] => 376.00
[recharge] => 0
[rechargea] => 0.00
)
怎样根据每一个数组的键值相加?
Array
(
[0] => Array
(
[reg] => 0
[regs] => 0
[login] => 7
[pay] => 0
[buy] => 4
[payment] => 11334.00
[recharge] => 1
[rechargea] => 3600.00
)
[1] => Array
(
[reg] => 1
[regs] => 0
[login] => 22
[pay] => 0
[buy] => 0
[payment] => 0.00
[recharge] => 0
[rechargea] => 0.00
)
[2] => Array
(
[reg] => 0
[regs] => 0
[login] => 5
[pay] => 0
[buy] => 1
[payment] => 376.00
[recharge] => 0
[rechargea] => 0.00
)
相关文章
相关视频
上一篇: php图像处理类实例_php技巧
下一篇: php仿Comsenz安装效果代码