title: php - replace array elements with another array's elements?
body: <p>Not sure how to go about this...  </p>
  
  <p>But, I have two arrays, one with updated information, another with outdated information...  There are a lot more elements in the second array, but I'm looking to "update" the outdated one with the updated information. </p>
  
  <p>Here's what the arrays look like:</p>
  
  <pre><code>//Outdated
  Array (
      [0] =&gt; Array
          (
              [anum] =&gt; 3236468462
              [cid] =&gt; 4899097762
              [mid] =&gt; 1104881401  
              [na_title] =&gt;         
              [na_fname] =&gt; JOHN                   
              [m_initial] =&gt;  
              [na_lname] =&gt; DOE           
              [na_suffix] =&gt;     
              [na_addr1] =&gt; 1234 SAMPLE AVENUE           
              [na_addr2] =&gt;                             
              [na_city] =&gt; NORWALK           
              [state] =&gt; OH
              [zip] =&gt; 
              [zip_plus_4] =&gt; 
              [route] =&gt; R002
              [dma_code] =&gt; 510334
          )
  )
  
  
  //Updated
  Array (
      [1] =&gt; Array
          (
              [0] =&gt; YUD990
              [1] =&gt; 98
              [2] =&gt; 1234 Sample Avenue
              [3] =&gt; 
              [4] =&gt; Norwalk
              [5] =&gt; OH
              [6] =&gt; 44857-9215
              [7] =&gt; 3236468462
          )
  )
  </code></pre>
  
  <p>To clarify, I want to:</p>
  
  <p>(1) Match up the value for [7] from the updated array with the value for [anum] in the outdated array, and then update [na_addr1], [na_addr2], [na_city], [state], [zip], [zip_plus_4] in the outdated array with the values for [2],[3],[4],[5],[6]  (I know I'll need to split the updated [6] in order to get it to map corrected to the outdated)</p>
  
  <p>Feel like I'm making this very confusing... sorry about that... </p>