1
$arr1 = Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 1
[5] => 1
[6] => 0
)
$arr2 = Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 1
)
我想創建的A2爲$ ARR1鍵的值的新數組的數組。我的結果數組應該是這樣的
$arr3 = Array
(
[0] => $arr1 = Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 1
[4] => 1
[5] => 1
[6] => 0
)
[1] => $arr2 = Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 1
)
)
注:所有都在for循環中。 Plz幫我..
您的示例如何反映您期望第二個數組的值成爲第一個數組中鍵的語句? – Gumbo 2012-03-03 07:11:39