Question: I have two arrays I want to combine them together first array

`$array1[]=(11,12,3,9);` 

and second array

`$array2[]=(mikel,joe,sami,toni);` 

I need the combined array like that

```
$combined_array[]=(Mikel,11,joe,12,sami,3,toni,9);

```

I tried this code in PHP but didn't work 

```
$array1[]=(11,12,3,9);
$array2[]=(mikel,joe,sami,toni);
for( $i=0;$i<sizeof($array1); $i++){
    $combined= array();
    $a = $array1[$i];
    $b= $array2[$i];
    array_push($combined,$a,$b);
}

```

Answer: 
```
$array1[]=(11,12,3,9);
$array2[]=(mikel,joe,sami,toni);
 $combined= array();

for( $i=0;$i<sizeof($array1); $i++){
    $a = $array1[$i];
    $b= $array2[$i];
    array_push($combined,$a,$b);
}

```

EDIT:
Declare your $combine array before for loop
```
$array1 = array(11, 12, 3, 9);
$array2 = array('mikel', 'joe', 'sami', 'toni');
$combined = array();

for($i = 0 ; $i < sizeof($array1); $i++) {
    array_push($combined, $array2[$i], $array1[$i]);
}

print_r($combined);

```