Ich habe einige Array wie dieFill Wert Bei Key Array PHP
[11] => Array ( [hotlink_thumb] => http://t2.gstatic.com/images?q=tbn:ANd9GcQHzF0iX9-f-P6BBDriiPKNMLYFAsikzPIbAWL0eZLH14ujpZkv [hotlink_source] => http://homeoidal.pro/wp-content/uploads/2015/05/outdoor-furniture-interesting-diy-outdoor-furniture-design-featuring-natural-brown-wicker-rattan-sectional-sofa-with-brown-padded-seat-cushion-and-cool-grey-pillow-plus-brown-rectangle-striped-plank.jpg [alt] => [caption] => [description] => [href] => http://localhost/wordpress/homemade-patio-furniture/furniture-tv-media/ [src] => [title] => Furniture Tv Media ) [12] => Array ( [hotlink_thumb] => http://t1.gstatic.com/images?q=tbn:ANd9GcTtYn0sWBKe8XIWgvmg7IBcNCB63oSwPEVGxKc6b5w8z3DPSRV_IA [hotlink_source] => http://www.widmeyer-construction.com/wp-content/uploads/2012/09/Redwood-Benches-005.jpg [alt] => [caption] => [description] => [href] => http://localhost/wordpress/homemade-patio-furniture/furniture-tv-deals/ [src] => [title] => Furniture Tv Deals )
und ich habe dann ein anderes Array
[0] => Array ( [alt] => the alt one [caption] => the caption one ) [1] => Array ( [alt] => the alt two [caption] => the caption two )
aber ich will
[11] => Array ( [hotlink_thumb] => http://t2.gstatic.com/images?q=tbn:ANd9GcQHzF0iX9-f-P6BBDriiPKNMLYFAsikzPIbAWL0eZLH14ujpZkv [hotlink_source] => http://homeoidal.pro/wp-content/uploads/2015/05/outdoor-furniture-interesting-diy-outdoor-furniture-design-featuring-natural-brown-wicker-rattan-sectional-sofa-with-brown-padded-seat-cushion-and-cool-grey-pillow-plus-brown-rectangle-striped-plank.jpg [alt] => the alt two [caption] => the caption one [description] => [href] => http://localhost/wordpress/homemade-patio-furniture/furniture-tv-media/ [src] => [title] => Furniture Tv Media ) [12] => Array ( [hotlink_thumb] => http://t1.gstatic.com/images?q=tbn:ANd9GcTtYn0sWBKe8XIWgvmg7IBcNCB63oSwPEVGxKc6b5w8z3DPSRV_IA [hotlink_source] => http://www.widmeyer-construction.com/wp-content/uploads/2012/09/Redwood-Benches-005.jpg [alt] => the alt two [caption] => the caption two [description] => [href] => http://localhost/wordpress/homemade-patio-furniture/furniture-tv-deals/ [src] => [title] => Furniture Tv Deals )
Ich denke, die interessanteste Frage wäre, wie Sie diese 2-Arrays erstellt haben. Vielleicht wäre die beste Antwort, sich das anzuschauen und zu sehen, ob Sie das gewünschte Array nicht auf einmal erstellen können, anstatt es zu reparieren, nachdem sie erstellt wurden – RiggsFolly
Ist das nicht im Wesentlichen das gleiche Problem wie Ihre vorherige Frage http: // stackoverflow .com/questions/37224453/php-merger-array-object – Barmar