while ($row = mysql_fetch_row($result)) $out[] = $row; exit(json_encode($out));
while(m = data.pop()) $("#div"+m[0]).text(m[1]);