Exemplo n.º 1
0
 function getCategoryPartialMatches($q)
 {
     $cats = CategoryInterests::getCategoriesArray();
     // Only do partial matches when the query is more than 3 characters.  Returns too much gibberish otherwise
     $results = array();
     if (strlen($q) > 3) {
         $results = $this->substrArraySearch($q, $cats);
     }
     foreach ($results as $k => $result) {
         $results[$k] = str_replace(" ", "-", $result);
     }
     return $results;
 }