Question:$class1 = array("John" => 100, "James" => 85);
$class2 = array("Micky" => 78, "John" => 45);
$classScores = array_merge_recursive($class1, $class2);
print_r($classScores);
This returns the following:
A Array ( [John] => Array ( [0] => 100 [1] => 45 ) [James] => 85 [Micky] => 78 )
B Array ([1] => 45 ) [James] [John] => Array ( [0] => 100 => 85 [Micky] => 78 )
C Array ( [James] => 85 [Micky] => 78 [John] => Array ( [0] => 100 [1] => 45 ) )
D Array ([1] => 45 ) [James] => 85 [Micky] => 78[John] => Array ( [0] => 100 )