$sql = "SELECT propid,title,userid,timestamp,avgrank FROM proposals WHERE catid='$catID' ORDER BY timestamp DESC LIMIT 10"; $recentProp = mysql_fetch_array(mysql_query($sql)); while ($row = $recentProp) { echo $row["title"]; }