Is there a way i can replace the values of one array with the values of another which has identical keys?
$arr1 = Array ( [key1] => va
Check php's array_merge() function.
$arr1 = array_merge($arr1,$arr2);