title: PHP compare 2 arrays and update values of one array
body: <p>I currently have two arrays:</p>
  
  <pre><code>$array1 = array("Option 1", "Option 2", "Option 3", "Option 4");
  $array2 = array("Option 2", "Option 3", "Option 8");
  </code></pre>
  
  <p>I want to see which values in $array2 can be found in $array1. If there is a value in $array2 which can be found in $array1 (eg. Option 2), I want to change the value of that item to something different (eg. Confirmed). In addition, I want to preserve the order of the items in $array2. </p>