You are here

function fuzzysearch_unique in Fuzzy Search 6

Same name and namespace in other branches
  1. 7 fuzzysearch.module \fuzzysearch_unique()

Recursive array_unique().

1 call to fuzzysearch_unique()
fuzzysearch_process in ./fuzzysearch.module
Process the search query

File

./fuzzysearch.module, line 1067
Module file for fuzzysearch module.

Code

function fuzzysearch_unique($array) {
  $result = array_map("unserialize", array_unique(array_map("serialize", $array)));
  foreach ($result as $key => $value) {
    if (is_array($value)) {
      $result[$key] = fuzzysearch_unique($value);
    }
  }
  return $result;
}