$arr_pre = array(
"name"=>"asdfg",
"city"=>"anand",
"address" => "anand",
);
$arr_current= array(
"name"=>"ud",
"state"=>"anand",
"address" => "ananda"
);
$result = array_diff_assoc($arr_current,$arr_pre);
$count_curr = array_count_values($arr_current);
$count_old = array_count_values($arr_pre);
foreach ($result as $key => $value){
if(!array_key_exists($key,$arr_pre ))
{
$key_new = "<b>".$key."</b>";
if(!in_array($value,$arr_pre))
{
$val = "<b>".$value."</b>";
}
else if((isset($count_curr[$value]) != isset($count_old[$value])))
{
$val = "<b>".$value."</b>";
}
else
{
$val = $value;
}
unset($arr_current_info[$key]);
}
else {
$key_new = $key;
if(!in_array($value,$arr_pre))
{
$val = "<b>".$value."</b>";
}
else if((isset($count_curr[$value]) != isset($count_old[$value])))
{
$val = "<b>".$value."</b>";
}
else
{
$val = $value;
}
}
$arr_current_info[$key_new]=$val;
}
echo "<pre>";
print_r($arr_current_info);
私はこのようにしました、そして私は完璧な答えを得ました