<?php $class1 = array("A" => 100, "C" => 85); $class2 = array("B" => 78, "D" => 45); $classScores = array_merge_recursive($class1, $class2); print_r($classScores); ?>