title: How to remove duplicate values from a multidimentional array according to a key
body: <p>Simple question  have following code but won't work</p>
  
  <pre><code>//Enter your code here, enjoy!
  $correo[] = array('valor'=&gt;'vikram.123@gmil.com','registro'=&gt;'23');
  $correo[] = array('valor'=&gt;'vikram.123@gmil.com','registro'=&gt;'24');
  $correo[] = array('valor'=&gt;'vikram.123@gmil.com','registro'=&gt;'26');
  
  function arrayUnique($myArray){
      if(!is_array($myArray))
          return $myArray;
  
      foreach ($myArray as &amp;$myvalue){
          $myvalue=serialize($myvalue);
      }
  
      $myArray=array_unique($myArray);
  
      foreach ($myArray as &amp;$myvalue){
          $myvalue=unserialize($myvalue);
      }
  
      return $myArray;
  
  } 
  
  $arr= arrayUnique($correo);
  
  var_dump($arr);
  </code></pre>
  
  <p>What I am trying to do is remove those row which has repetitive <code>valor</code> key for example the result of above array should be </p>
  
  <pre><code>Array ( 
      [0] =&gt; Array ( 
          [valor] =&gt; 'vikram.123@gmail.com' 
          [registro] =&gt; 24 
          ) 
  )
  </code></pre>