Rumah >pembangunan bahagian belakang >tutorial php > 小弟我想给每个值,都添加一个元素c => 3,有没有系统函数
我想给每个值,都添加一个元素c => 3,有没有系统函数啊
我想给每个值,都添加一个元素c => 3,不用foreach可以吗,有没有系统函数啊
$ary =
Array
(
[0] => Array
(
[a] => 1
[b] => 2
)
[1] => Array
(
[a] => 1
[b] => 2
)
...
)
目标:
Array
(
[0] => Array
(
[a] => 1
[b] => 2
[c] => 3
)
[1] => Array
(
[a] => 1
[b] => 2
[c] => 3
)
...
)