Posted By

bedomax on 09/22/10


Tagged

php array function


Versions (?)

Function Array Unique


 / Published in: PHP
 

  1. <?php
  2. function super_unique($array)
  3. {
  4. $result = array_map("unserialize", array_unique(array_map("serialize", $array)));
  5.  
  6. foreach ($result as $key => $value)
  7. {
  8. if ( is_array($value) )
  9. {
  10. $result[$key] = super_unique($value);
  11. }
  12. }
  13.  
  14. return $result;
  15. }
  16. ?>

Report this snippet  

You need to login to post a comment.