/** * PHP按值合并数组 * */ function my_array_merge(&$array1, &$array2) { $result = Array(); foreach($array1 as $key => &$value) { $result[$key] = array_merge($value, $array2[$key]); } return $result; }
/** * PHP按值合并数组 * */ function my_array_merge(&$array1, &$array2) { $result = Array(); foreach($array1 as $key => &$value) { $result[$key] = array_merge($value, $array2[$key]); } return $result; }