我有这个PHP代码,我收到此错误:解析错误:语法错误,意外'}',期待';'在第120行的[文件位置]
while($ array etc等)的行是第120行。
if($numrows != 0)
{
do
{
//echo "<a href='approve.php?ref=" . $array['id'] . "'>Your '" . $array['keywords'] . "' article has been written and needs to be reviewed.</a>";
//echo "<br />";
} while($array = mysql_fetch_array($result)) //While there are still rows in the SELECT query.
}
想法?我必须失明。谢谢!
答案 0 :(得分:7)
} while($array = mysql_fetch_array($result))
应该是
} while($array = mysql_fetch_array($result));
顺便说一句,代码片段似乎应该使用while
循环,除非您是第一次故意使用旧值$array
。
答案 1 :(得分:0)
在你的声明结束时a;缺少:) while($array = mysql_fetch_array($result));
答案 2 :(得分:0)
在;
声明
while
while($array = mysql_fetch_array($result)); //<---- add semicolon here
答案 3 :(得分:0)
if($numrows != 0)
{
do
{
//echo "<a href='approve.php?ref=" . $array['id'] . "'>Your '" . $array['keywords'] . "' article has been written and needs to be reviewed.</a>";
//echo "<br />";
} while($array = mysql_fetch_array($result)); //While there are still rows in the SELECT query.
}
在条件
之后忘记了;