Question: I have two arrays like below example..

```
 $arr1 = array("0" => "1");
 $arr2 = array("2" => "3");

```

i want to make two different array by merging all the keys in one array and and all the values inside another array.

Expected output..

```
$arr3 = array("0" => "2");
$arr4 = array("1" => "3");

```

Answer: 
```
 $arr1 = array("0","1");
 $arr2 = array("2","3");

 foreach($arr1 as $key => $value){
   $arr3[$value] = $arr2[$key];
 }

```

That's what you need. 
Note: 1) your description of $arr1 and $arr2 is incorrect 
2) It needs more logic when array lengths are not equal.
Perhaps you can use [array\_combine()](http://php.net/manual/en/function.array-combine.php)

```
<?php
$a = array('green', 'red', 'yellow');
$b = array('avocado', 'apple', 'banana');
$c = array_combine($a, $b);

print_r($c);
?>

```