title: How to combine two associative arrays, remove duplicate values while keeping the keys, and the sort alphabetical
body: <p>So I have two associative arrays with family members and names. Each array have the same index key, but different values. I need to combine the two arrays, remove duplicate values, not duplicate keys, then sort it alphabetical.</p>
  
  <p>So far I have </p>
  
  <pre><code>Array1 = array(
      "Grandma"=&gt;"Laurie", 
      "Grandpa"=&gt;"John",
       "Uncle"=&gt;"Jeff", 
       "Aunt"=&gt;"Julie", 
       "Cousin1"=&gt;"Julie",
       "Cousin2"=&gt;"Anna");
  $Array2 = array(
      "Grandma"=&gt;"Shannon", 
      "Grandpa"=&gt;"Phillip",
       "Uncle"=&gt;"Mike", 
       "Aunt"=&gt;"Laurie", 
       "Cousin1"=&gt;"Anna",
       "Cousin2"=&gt;"Jeff",
       "Cousin3"=&gt;"Kate"); 
  //Combine the arrays
  $array = array_merge_recursive($Mother_side, $Father_side);
  </code></pre>
  
  <p>So far so good, but then I try:</p>
  
  <pre><code>    $Distinct_names = array_unique($array); 
  </code></pre>
  
  <p>and I get errors Notice: Array to string conversion. Any ideas? Thanks.</p>