php - Jquery ui js return -
i use jquery ui js.
when return result doing this:
$stmt = $dbh->prepare('select id,value `table` `column` :keyword'); $keyword = "%".$data."%"; $stmt->bindparam(':keyword', $keyword, pdo::param_str); $stmt->execute(); while ($user = $stmt->fetch(pdo::fetch_assoc)) { $user['value']=htmlentities(stripslashes($user['column'])); $user['id']=(int)$user['id']; $user_set[] = $user; }
and returned array:
[{"id":1,"column":"user","value":"user"}]
i set $user[id] , $user['value'], there 3 things returned , why?
greetings!
while ($user = $stmt->fetch(pdo::fetch_assoc)) { ^^^^^
Comments
Post a Comment