Guest User

Untitled

a guest
Feb 22nd, 2012
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function removeDuplicates($array) {
  3.     $result = array();
  4.     $check = array();
  5.     foreach ($array as $key => $value) {
  6.         $test = print_r($value, TRUE);
  7.         if (!isset($check[$test])) {
  8.             $check[$test] = TRUE;
  9.             $result[$key] = $value;
  10.         }
  11.     }
  12.     return $result;
  13. }
  14. ?>
RAW Paste Data