I have two arrays here:

```
<?php
    $array1 = array(
        array('id' => 1, 'name' => 'John Doe', 'age' => 20),
        array('id' => 2, 'name' => 'Mae Doe', 'age' => 17),
        array('id' => 3, 'name' => 'Mark Smith', 'age' => 35),
        array('id' => 4, 'name' => 'Selena Smith', 'age' => 15),
        array('id' => 5, 'name' => 'Shane Doe', 'age' => 26),
        array('id' => 6, 'name' => 'Will Smith', 'age' => 45)
    )

    $array2 = array(
        array('id' => 1, 'address' => 'Singapore'),
        array('id' => 4, 'address' => 'Japan'),
        array('id' => 5, 'address' => 'Korea')
    )
?>

```

I want to join them, kind of left join in mysql so the result will be like this

```
$result = array(
    array('id' => 1,'name' => 'John Doe','age' => 20, 'address' => 'Singapore'),
    array('id' => 2,'name' => 'Mae Doe','age' => 17),
    array('id' => 3,'name' => 'Mark Smith','age' => 35),
    array('id' => 4,'name' => 'Selena Smith','age' => 15, 'address' => 'Japan'),
    array('id' => 5,'name' => 'Shane Doe','age' => 26, 'address' => 'Korea'),
    array('id' => 6,'name' => 'Will Smith','age' => 45)
)

```

The address will be merged to $array1 based on the id.

Is this possible using PHP? Please help. Thanks.