我正在尝试输出第一行的特殊内容,但它似乎在每一行输出,这是我使用的代码:
$query = mysql_query("SELECT * FROM chat WHERE id > '".$_GET["latest"]."' ORDER BY id DESC LIMIT 0, 20");
$number = mysql_num_rows($query);
$i = 1;
while ($row = mysql_fetch_assoc($query)) {
echo "<div class='babble' style='width:130px;overflow:hidden;margin:auto;'><a href=\"javascript:ajaxpage('user_profile.php?game=1&ajax=1&user=".$row['author']."', 'content');\" style=\"cursor:pointer;\"><font color=#ff4355><b>".$row['author']."</b></font></a><font color=#ff4355>:</font></b> ".$row['babble']."</div>";
if($i = 1)
{
echo "<script type='text/javascript'>newestid=".$row['id']."</script>";
$i = 2;
}
}