"pineapple", 2=>"grape", 4=>"kiwi"); $array3 = array(0=>"watermelon", 1=>"papaya"); // Performing array replacement $result = array_replace($array1, $array2, $array3); print_r($result); ?>