I have this 2 array:

```
$array1 = [3,6,5];
$array2 = [1,2,3,4,5,6];

```

I want to achieve this:

```
$newArray = [3,6,5,1,2,4];

```

so it keep the sequence and append the missing value on `$array1`.

```
    foreach($array1 as $data){
        if(!in_array($data, $array2)){
            array_push($array2, $data);
        }
    }

```

I try above code but what i got is my array become double.

Any solution?