0
合併我有這樣一個數組:`陣列迭代和使用PHP
Array ( [0] => Array ( [0] => Array ( [productid] => 141 [fieldid] => 2 [value] => Laptop ) [1] => Array ( [productid] => 191 [fieldid] => 2 [value] => Books ) [2] => Array ( [productid] => 177 [fieldid] => 2 [value] => Printer ) ) [1] => Array ( [0] => Array ( [productid] => 141 [fieldid] => 1 [value] => 3 ) [1] => Array ( [productid] => 191 [fieldid] => 1 [value] => 4 ) [2] => Array ( [productid] => 177 [fieldid] => 1 [value] => 2 ) ) )`
我想這個數組修改,看起來像下面這樣:
Array ( [0] => Array ( [productid] => 141 [fieldid] => 2 [value] => Laptop ) [1] => Array ( [productid] => 191 [fieldid] => 2 [value] => Books ) [2] => Array ( [productid] => 177 [fieldid] => 2 [value] => Printer ) [3] => Array ( [productid] => 141 [fieldid] => 1 [value] => 3 ) [4] => Array ( [productid] => 191 [fieldid] => 1 [value] => 4 ) [5] => Array ( [productid] => 177 [fieldid] => 1 [value] => 2 ) )
只需卸下外陣列並結合所有的數組塊合而爲一。這可能在PHP中。 在此先感謝。
這就像一個魅力。謝謝。 –