Question: I have an array like this:

```
Array
(
    [0] => wahyu@email.co.id
    [1] => wahyu@email.co.id
)
Array
(
    [0] => wahyu@email.co.id
    [1] => wahyu@email.co.id
)

```

I would like to combine array above like this:

```
Array
(
    [0] => wahyu@email.co.id
    [1] => wahyu@email.co.id
    [2] => wahyu@email.co.id
    [3] => wahyu@email.co.id
)

```

How the way to combine it?

Answer: 
**array\_merge** function is used for the combine two array.

```
$a = array("0" => "one@email.co.id",
    "1" => "two@email.co.id"
);

$b = array(
    "0" => "three@email.co.id",
    "1" => "four@email.co.id"
);

$merged_array = array_merge($a,$b);

echo "<prE>";
print_r($merged_array);

```
Use the PHP `array_merge`...

> 
> Merges the elements of one or more arrays together so that the values
>  of one are appended to the end of the previous one.
> 
> 
> 

see docs: <http://php.net/manual/en/function.array-merge.php>

```
<?php
$array1 = array("email@domain.com","email2@domain.com");
$array2 = array("email3@domain.com","email4@domain.com");

$array_merged = array_merge($array1, $array2);
?>

```