How I merge two array including the keys, below array structure available with requirement, can any one help for this:
$a1=array('533532'=>array('token'=>'token','tripboardrefid'=>'tripboardrefid'));
$a2=array('533179'=>array('token'=>'token','tripboardrefid'=>'tripboardrefid'));
print_r(array_merge($a1,$a2));
Getting this structure:
Array
(
[0] => Array
(
[token] => token
[tripboardrefid] => tripboardrefid
)
[1] => Array
(
[token] => token
[tripboardrefid] => tripboardrefid
)
)
Need this structure:
Array
(
[533179] => Array
(
[token] => token
[tripboardrefid] => tripboardrefid
)
[533532] => Array
(
[token] => token
[tripboardrefid] => tripboardrefid
)
)