Just add a second array with an empty dimension statement.
$one = array( array('id'=>'1', 'name'=>'Mike'), array('id'=>'2', 'name'=>'Lina') ); $two = array('id'=>'3', 'name'=>'Niken'); $one[] = $two;
But if you want to combine unique elements, you need to do something like this:
if(false === array_search($two, $one)){ $one[] = $two; }
source share