日期:2014-05-16 浏览次数:20701 次
$a = array("1"=>"123","2"=>"1234","3"=>"1334");
$b = array("1"=>"123","2"=>"1230");
$c = array();
foreach($a as $key=>$val){
if(isset($b[$key])){
if($val!=$b[$key]){
$c[$key] = $val>$b[$key]? $val : $b[$key];
}
}else{
$c[$key] = 'delete';
}
}
print_r($c);