PHP - replace values of array with another array

rajrana007

New Member
Is there a way i can replace the values of one array with the values of another which has identical keys?\[code\]$arr1 = Array ( [key1] => var1 [key2] => var2 )$arr2 = Array ( [key1] => var3 [key2] => var4 )\[/code\]I want to change $arr1's values to the ones in $arr2 im doing this about 10 times, and i can do it line by line, but im wondering if there's a simpler way.Thanks!
 
Back
Top