I was wondering how I would be able to get this working? I've read the demo files, but I'm curious if there is a way to make it work like this. I've got one php file that is something like this
$query = "SELECT DISTINCT City FROM Locations ORDER BY City";
foreach($DBH->query($query) as $row)
{
$array[] = $row['City'];
}
echo json_encode($array);
and some js
$('.searchbox').autocomplete('test.php', {minChars: 3,});
When I test it, I type in three letters, and instead of suggestions, I get the whole json array. I know that it's possible for this jquery-autocomplete to work with local data, but I just don't know how. https://github.com/dyve/jquery-autocomplete/ is the source, by the way.