Custom implementation of $A $B merged into an array, how the same key value does not overwrite the original value.

$A = array ("averse = >" Origin","b"= > "Apple"); $B=array (" centering = > "Lion","b"= >" Tiger"); Custom implementation $A $B is merged into one array, and the same key value does not overwrite the original value.

has also looked up array_merge_recursive on the Internet, but it doesn"t quite meet this requirement
Php
Nov.23,2021

No, there won't be two identical key in the array. You can put two values in a key separated by commas.


$A = array('a' => 'Origin', 'b' => 'Apple');
$B = array('c' => 'Lion', 'b' => 'Tiger');
$c = $A + $B;
//  array('a' => 'Origin', 'b' => 'Apple', 'c' => 'Lion');
//  key 
Menu