Hi, I am planning yo use jquery UI Autosuggest for a search form.so I need a json output which can be used by Jquery UI Auto suggest.
heres the database
table name recent_tags
I have tried this first connected to db
$do = mysql_query("SELECT * FROM recent_tags where query like '%" . $_GET['qery'] . "%'");
while ($row = mysql_fetch_array($fetch, MYSQL_ASSOC)) {
$row_array['query'] = $row['query'];
array_push($return_arr,$row_array);
}
echo json_encode($return_arr);
but It's not working.. please guide me..
EDIT :
getting error
Warning: array_push() [function.array-push]: First argument should be an array in /pathto/my/file.php
Thanks