【发布时间】:2015-08-24 12:01:27
【问题描述】:
如何制作两个数组对象的单个数组数组对象 我有以下两个对象数组
如何制作两个数组对象的单个数组数组对象 我有以下两个对象数组
Array
(
[0] => stdClass Object
(
[id] => 25
[authorityId] => 2
[grantVillage] => test
[agency] => test
[certificate] => Panding
[amount] => 50000
[startDate] => 2015-12-08
[endDate] => 2015-12-08
[grantArea] => test
[added_date] => 0000-00-00
)
[1] => stdClass Object
(
[id] => 26
[authorityId] => 2
[grantVillage] => testing2
[agency] => testing
[certificate] => Verified
[amount] => 50000
[startDate] => 1970-01-01
[endDate] => 1970-01-01
[grantArea] => test
[added_date] => 0000-00-00
)
)
Array
(
[0] => stdClass Object
(
[name] => kandi Area
)
[1] => stdClass Object
(
[name] => kandi Area
)
)
我想做:
Array
(
[0] => stdClass Object
(
[name] => kandi Area
[id] => 25
[authorityId] => 2
[grantVillage] => test
[agency] => test
[certificate] => Panding
[amount] => 50000
[startDate] => 2015-12-08
[endDate] => 2015-12-08
[grantArea] => test
[added_date] => 0000-00-00
)
[1] => stdClass Object
(
[name] => kandi Area
[id] => 26
[authorityId] => 2
[grantVillage] => testing2
[agency] => testing
[certificate] => Verified
[amount] => 50000
[startDate] => 1970-01-01
[endDate] => 1970-01-01
[grantArea] => test
[added_date] => 0000-00-00
)
)
任何帮助将不胜感激。在此先感谢。
【问题讨论】:
-
期望的输出是什么?
-
问题中已经提到了所需的输出。
-
这不是重复的问题,请再次查看这两个问题。
标签: php codeigniter