I am trying to use json_encode() in a while loop while getting database results. Here is my code:
json_encode()
$database = sqlite_open(\"thenew.db\",
Push each user to an array:
$data = array(); while($row = sqlite_fetch_array($results)) { $data[] = $row['uid'] . " " . $row['username'] . " " . $row['xPos'] . " " . $row['yPos']; } echo json_encode(array("response"=>$data));