-3
我需要将两个关联数组合并为一个。 1.第一阵列如何合并两个关联数组php
Array
(
[0] => stdClass Object
(
[c_id] => 743
[userid] => 570c842ce6073
[postid] => 5761a6fb30cfa
[comment] => demo testing
)
);
2.第二阵列
Array
(
[hip] => 120
)
我需要象下面
Array
(
[0] => stdClass Object
(
[c_id] => 743
[userid] => 570c842ce6073
[postid] => 5761a6fb30cfa
[comment] => demo testing
[hip] => 120
)
);
如何可以写PHP代码
嗨存在,欢迎堆栈溢出...你使用键盘,计算机和编辑器来编写php代码。 :-)不,真的,这个问题太简单了,你应该能够自己找到答案,一旦你有所需的三个项目。例如:'$ array1 [0] - > hip = $ array2 ['hip'];',但我想你想要一个更一般的答案?看看手册。 –