我必须数组。这是第一个:
array(3)
{
[0]=> string(10) "image1.jpg"
[1]=> string(10) "image2.jpg"
[2]=> string(10) "image3.jpg"
}
第二个:
array(3)
{
[0]=> object(stdClass)#22 (4)
{
["id"]=> string(1) "1"
["name"]=> string(6) "Name 1"
["file"]=> string(15) "f1335421531.zip"
["desc"]=> string(6) " "
}
[1]=> object(stdClass)#23 (4)
{
["id"]=> string(1) "2"
["name"]=> string(6) "Name 2"
["file"]=> string(15) "f1335421552.zip"
["desc"]=> string(6) " "
}
[2]=> object(stdClass)#24 (4)
{
["id"]=> string(1) "3"
["name"]=> string(6) "Name 3"
["file"]=> string(15) "f1335421588.zip"
["desc"]=> string(6) " "
}
}
如何将这些数组合并为一个包含以下项目:
[0]=> object(stdClass)#22 (4)
{
["id"]=> string(1) "1"
["name"]=> string(6) "Name 1"
["file"]=> string(15) "f1335421531.zip"
["desc"]=> string(6) " "
["img"]=> string(10) "image1.jpg"
}
等等
是否有任何功能可以做到这一点,或者我可能需要编写循环?