1
使用array_push兩個多維數組(fruit1,fruit2),但我得到下面的結果結合起來:PHP Array_Push有兩個多維數組,但保持版式
[86733] => Array ( [Fruit] => Apple [NAME] => Mac ) [86734] => Array ( [Fruit] => Orange [NAME] => Navel ) [86735] => Array ( [0] => Array ( [Fruit] => Pear [NAME] => Green ) [1] => Array ( [Fruit] => Pineapple [NAME] => )
真的找這種格式的組合時,它們。只是想將一個數組添加到另一個數組,而不是合併數組。
[86733] => Array ( [Fruit] => Apple [NAME] => Mac ) [86734] => Array ( [Fruit] => Orange [NAME] => Navel ) [86735] => Array ( [Fruit] => Pear [NAME] => Green ) [86736] => Array ( [Fruit] => Pineapple [NAME] => )
謝謝!
那麼,你現在在做什麼? 'array_push($ array,$ array2);'? – bwoebi 2014-09-26 23:31:14