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
just you must replace `array_push($combined, $a, $b)` to 2 line code :

```
array_push($combined, $a)

```

and

```
array_push($combined, $b)

```

also you could replace `sizeof($array1)` in your `forloop` to `count($array1) - 1`

will be ok