一、明細檔,原有陣列更新
<?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'yellow' => 7, 'cyan' => 8); var_dump(array_diff_key($array1, $array2)); ?> array(3) { ["blue"]=> int(1) ["red"]=> int(2) ["purple"]=> int(4) }