".$start." ORDER BY id DESC LIMIT 0,10) AS new_tweets ORDER BY id ASC"; } $result = mysql_query($query); $data = array(); //Initializing the results array while ($row = mysql_fetch_assoc($result)){ array_push($data, $row); } $json = json_encode($data); print $json; ?>