i have 2 arrays with different dimensions, and how to merge my one dimension array to two dimension array, here is my 2 array look like
this is my two dimension array
array (
0 =>
array (
'id' => 1,
'alias' => 'Anderson',
'location' => 'Semarang',
'up' => 39144,
'status' => 'DOWN',
),
and this is my one dimension array
array (
'last_accessed_by' => 1,
'last_refresh' => '2018-10-29 00:21:39',
'created_at' => '2018-10-29 00:21:39',
)
this is what i expect from merging the arrays
array (
0 =>
array (
'id' => 1,
'alias' => 'Anderson',
'location' => 'Semarang',
'up' => 39144,
'status' => 'DOWN',
'last_accessed_by' => 1,
'last_refresh' => '2018-10-29 00:21:39',
'created_at' => '2018-10-29 00:21:39',
),
$data=json_decode($response,true);this is the array coming from, i'm not input it, just decode from response