title: PHP to remove duplicated values and exactly UNIQUE from multidimensional array
body: <p>I found many question and answer about this, but not match what i need.
  i think it's similar/same to <a href="https://stackoverflow.com/questions/307674/how-to-remove-duplicate-values-from-a-multi-dimensional-array-in-php">this question</a> but don't know why not working for this case. So please try before judging duplicates, thank you.</p>
  
  <h1>array source</h1>
  
  <pre><code>$avar = array(
  0 =&gt; array(1,2,3,4,5,6,7,8,9),
  1 =&gt; array(10,11,12,13,14,15,16,17,7,8,9,10),
  23 =&gt; array(21,22,23,4,5,6,7,11,12,13,14,15,21));
  </code></pre>
  
  <h1>desired result</h1>
  
  <pre><code>$avar = array(
  0 =&gt; array(1,2,3,4,5,6,7,8,9),
  1 =&gt; array(10,11,12,13,14,15,16,17),
  23 =&gt; array(21,22,23));
  </code></pre>
  
  <h1>PHP script</h1>
  
  <pre><code>&lt;?php
  function super_unique($array)
  {
    $result = array_map("unserialize", array_unique(array_map("serialize", $array)));
  
    foreach ($result as $key =&gt; $value)
    {
      if ( is_array($value) )
      {
        $result[$key] = super_unique($value);
      }
    }
  
    return $result;
  }
  
  $result = super_unique($avar);  
  echo "&lt;pre&gt;";
  print_r($result);
  
  ?&gt;
  </code></pre>
  
  <p>similar question with answer but not solve my case:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/307674/how-to-remove-duplicate-values-from-a-multi-dimensional-array-in-php">How to remove duplicate values from a multi-dimensional array in PHP</a></li>
  <li><a href="https://stackoverflow.com/questions/3598298/php-remove-duplicate-values-from-multidimensional-array">PHP remove duplicate values from multidimensional array</a></li>
  </ol>
  
  <p>Thank you all</p>