title: Combining Two Unequal Arrays by Matching Keys
body: <p>I'd like to combine the two arrays below into one. More specifically, I want to add the contents of the second array to the the matching key in the first array. The keys in the final array should have contents of matching keys of both arrays.</p>
  
  <pre><code>Array ( 
  [123456789_404045862944400] =&gt; 192 
  [123456789_403274909688162] =&gt; 186 
  [123456789_402735273075459] =&gt; 311 
  [123456789_252948031457462] =&gt; 385 
  [123456789_400606749954978] =&gt; 287 
  [123456789_286755318061725] =&gt; 358 
  [123456789_399687880046865] =&gt; 257 
  [123456789_398332190182434] =&gt; 240 
  [123456789_397768486905471] =&gt; 311 
  [123456789_396907650324888] =&gt; 293 
  [123456789_394850557197264] =&gt; 496 
  [123456789_394121230603530] =&gt; 475 
  [123456789_369757766367627] =&gt; 488 
  [123456789_391602517522068] =&gt; 506 
  [123456789_390848830930770] =&gt; 437 
  [123456789_389975351018118] =&gt; 452 
  [123456789_242486689170043] =&gt; 525 
  [123456789_388151047867215] =&gt; 415 
  [123456789_387476447934675] =&gt; 502 
  [123456789_386620518020268] =&gt; 467 
  [123456789_215937481836499] =&gt; 359 
  )
  
  Array (
  [123456789_404045862944400] =&gt; 23:52 
  [123456789_403274909688162] =&gt; 22:21 
  [123456789_402735273075459] =&gt; 04:29 
  [123456789_252948031457462] =&gt; 06:22 
  [123456789_400606749954978] =&gt; 05:01 
  [123456789_286755318061725] =&gt; 04:51 
  [123456789_399687880046865] =&gt; 21:51 
  [123456789_398395260176127] =&gt; 01:13 
  [123456789_398332190182434] =&gt; 23:19 
  [123456789_397768486905471] =&gt; 05:38 
  [123456789_397509266931393] =&gt; 00:46 
  [123456789_396907650324888] =&gt; 03:38 
  [123456789_394850557197264] =&gt; 05:12 
  [123456789_394121230603530] =&gt; 04:15 
  [123456789_369757766367627] =&gt; 04:01 
  [123456789_391602517522068] =&gt; 03:44 
  [123456789_390848830930770] =&gt; 06:05 
  [123456789_389975351018118] =&gt; 04:00 
  [123456789_242486689170043] =&gt; 04:13 
  [123456789_388151047867215] =&gt; 00:22 
  [123456789_387544787927841] =&gt; 07:34 
  [123456789_387476447934675] =&gt; 04:51 
  [123456789_386620518020268] =&gt; 06:05 
  [123456789_386504878031832] =&gt; 02:38 
  [123456789_215937481836499] =&gt; 01:10 
  ) 
  </code></pre>
  
  <p>What I've tried so far:</p>
  
  <pre><code>$array1 = array_merge($array1, $array2);
  </code></pre>
  
  <p>Also tried something like:</p>
  
  <pre><code>foreach($arr2 as $k=&gt;$v) {
      $a[$k] = $arr1[$k];
  }
  </code></pre>
  
  <p>But it it doesn't combine/merge the arrays correctly be matching keys.</p>
  
  <p>I also tried it with <code>array_combine</code> but since it creates an array by using one array for keys and another for its values I couldn't get that to work either. </p>