title: php array of array merge
body: <p>I have these two arrays:</p>
  
  <p>niceviewA Array ( </p>
  
  <pre><code>[0] =&gt; Array ( [dow] =&gt; Monday [goalamount] =&gt; 1000.00 ) 
  [1] =&gt; Array ( [dow] =&gt; Tuesday [goalamount] =&gt; 1000.00 ) 
  [2] =&gt; Array ( [dow] =&gt; Wednesday [goalamount] =&gt; 1500.00 ) 
  [3] =&gt; Array ( [dow] =&gt; Thursday [goalamount] =&gt; 1800.00 ) 
  [4] =&gt; Array ( [dow] =&gt; Friday [goalamount] =&gt; 1800.00 ) 
  [5] =&gt; Array ( [dow] =&gt; Saturday [goalamount] =&gt; 2000.00 ) 
  [6] =&gt; Array ( [dow] =&gt; Sunday [goalamount] =&gt; 1500.00 ) )
  </code></pre>
  
  <p>and this
  actualNet Array ( </p>
  
  <pre><code>[0] =&gt; Array ( [dow] =&gt; Friday [NetSales] =&gt; 1542.56 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Jeremy,Rilee ) 
  [1] =&gt; Array ( [dow] =&gt; Thursday [NetSales] =&gt; 1219.89 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Vic ) 
  [2] =&gt; Array ( [dow] =&gt; Wednesday [NetSales] =&gt; 1019.9 [ClosingBarTender] =&gt; Cora [OtherBartenders] =&gt; Tory ) 
  [3] =&gt; Array ( [dow] =&gt; Tuesday [NetSales] =&gt; 1317.44 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Bill ) 
  [4] =&gt; Array ( [dow] =&gt; Monday [NetSales] =&gt; 907.85 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Bill ) 
  [5] =&gt; Array ( [dow] =&gt; Sunday [NetSales] =&gt; 1954.84 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Ginger ) 
  [6] =&gt; Array ( [dow] =&gt; Saturday [NetSales] =&gt; 2496.28 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; LJ,Ginger ) )
  </code></pre>
  
  <p>I used <strong>array_replace_recursive</strong>, but that just joined them on index, I need to join them on the 'dow' element, so it would look like this:</p>
  
  <p>actualNet Array ( </p>
  
  <pre><code>[0] =&gt; Array ( [dow] =&gt; Friday [NetSales] =&gt; 1542.56 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Jeremy,Rilee [goalamount] =&gt; 1800.00) 
  [1] =&gt; Array ( [dow] =&gt; Thursday [NetSales] =&gt; 1219.89 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Vic [goalamount] =&gt; 1800.00) 
  [2] =&gt; Array ( [dow] =&gt; Wednesday [NetSales] =&gt; 1019.9 [ClosingBarTender] =&gt; Cora [OtherBartenders] =&gt; Tory [goalamount] =&gt; 1500.00) 
  [3] =&gt; Array ( [dow] =&gt; Tuesday [NetSales] =&gt; 1317.44 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Bill [goalamount] =&gt; 1000.00) 
  [4] =&gt; Array ( [dow] =&gt; Monday [NetSales] =&gt; 907.85 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Bill [goalamount] =&gt; 1000.00) 
  [5] =&gt; Array ( [dow] =&gt; Sunday [NetSales] =&gt; 1954.84 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Ginger[goalamount] =&gt; 1500.00 ) 
  [6] =&gt; Array ( [dow] =&gt; Saturday [NetSales] =&gt; 2496.28 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; LJ,Ginger [goalamount] =&gt; 20000.00) )
  </code></pre>
  
  <p>Not like this:
  niceview2Array ( </p>
  
  <pre><code>[0] =&gt; Array ( [dow] =&gt; Friday [goalamount] =&gt; 1000.00 [NetSales] =&gt; 1542.56 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Jeremy,Rilee ) 
  [1] =&gt; Array ( [dow] =&gt; Thursday [goalamount] =&gt; 1000.00 [NetSales] =&gt; 1219.89 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Vic ) 
  [2] =&gt; Array ( [dow] =&gt; Wednesday [goalamount] =&gt; 1500.00 [NetSales] =&gt; 1019.9 [ClosingBarTender] =&gt; Cora [OtherBartenders] =&gt; Tory ) 
  [3] =&gt; Array ( [dow] =&gt; Tuesday [goalamount] =&gt; 1800.00 [NetSales] =&gt; 1317.44 [ClosingBarTender] =&gt; Bill [OtherBartenders] =&gt; Bill ) 
  [4] =&gt; Array ( [dow] =&gt; Monday [goalamount] =&gt; 1800.00 [NetSales] =&gt; 907.85 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Bill ) 
  [5] =&gt; Array ( [dow] =&gt; Sunday [goalamount] =&gt; 2000.00 [NetSales] =&gt; 1954.84 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; Ginger ) 
  [6] =&gt; Array ( [dow] =&gt; Saturday [goalamount] =&gt; 1500.00 [NetSales] =&gt; 2496.28 [ClosingBarTender] =&gt; Rilee [OtherBartenders] =&gt; LJ,Ginger ) ) 
  </code></pre>
  
  <p>I have tried to iterate through the arrays, but I can’t get a match on ‘dow’.  I’m so frustrated I have come to stackoverflow and hope some one can help!  Thanks so much!</p>