while($row = mysql_fetch_array($query)){
$response = array(
'id' => $row['true'],
'username' => $row['username'],
'image'=>$row['image']
);
echo json_encode($response);
}
im trying to send like 20 rows back to a mobile client using json, is this the way to do it, im not sure if this makes sense!! espcially in a while loop.
Create an array and json_encode it after your loop: