Reputation: 188
I have an array like this
$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
)
I want to create a new array with the values of a2 as keys in $arr1. My resultant array should be like this
$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
)
)
Note : All are in a for loop. Plz help me..
Upvotes: 1
Views: 411