title: Counting the duplicate keys of 1 array and update the matching value of the second array
body: <p>I am trying to count the duplicate keys from array <code>$new_result_months</code>, remove them and update the value of <code>$new_result_users</code> with the matching key. if I would do an <code>array_combine</code> every key should match the value. I really tried but did not managed to think of a version.</p>
  
  <pre><code>$new_result_months = array(  
                          'Dec 2013',
                          'Jan 2014',
                          'Feb 2014',
                          'Mar 2014',
                          'Apr 2014',
                          'May 2014',
                          'Jun 2014',
                          'Jul 2014',
                          'Aug 2014',
                          'Sep 2014',
                          'Oct 2014', 
                          'Oct 2014', // remove one duplicate key and keep unique one
                          'Nov 2014', 
                          'Nov 2014', // remove one duplicate key and keep unique one
                          'Nov 2014', // remove one duplicate key and keep unique one
                          'Dec 2014'
                      );
  $new_result_users = array(
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            1,
                            0,
                            1,
                            1,
                            0
                      );
  </code></pre>
  
  <p>EXPECTED OUTPUT</p>
  
  <pre><code>$new_result_months = array(  
                          'Dec 2013',
                          'Jan 2014',
                          'Feb 2014',
                          'Mar 2014',
                          'Apr 2014',
                          'May 2014',
                          'Jun 2014',
                          'Jul 2014',
                          'Aug 2014',
                          'Sep 2014',
                          'Oct 2014',
                          'Nov 2014',
                          'Dec 2014'
                      );
  
  $new_result_users = array(
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            0,
                            1,  // needs to match with month oct 2014 and update it to 1
                            2, // needs to match with month nov 2014 and update it to 2
                            0
                      );
  </code></pre>