I have two arrays structures like this
array(
'11' => '11',
'22' => '22',
'33' => '33',
'44' => '44'
);
array(
'44' => '44',
'55' => '55',
'66' => '66',
'77' => '77'
);
I wanna combine these two. And this should occur in a way that there are no duplicates available in the resulting output as well as their original keys
array(
'11' => '11',
'22' => '22',
'33' => '33',
'44' => '44',
'55' => '55',
'66' => '66',
'77' => '77'
);
I implemented this method suggested by my friend by it is not working. Any ideas?
$output = array_unique( array_merge( $array1 , $array2 ) );