这个php代码有什么问题?
$sql = mysql_query("select * from news where isActive = 1 and partnerid_fk = '$partnerid'");
$news = "";
while($row = mysql_fetch_assoc($sql)) {
news .= "<li class='news-item'><a href='#'>" . $row['news'] . "</a></li>";
}
新闻追加行上的错误:
Syntax error.
答案 0 :(得分:4)
你忘了你的美元符号:
news .=
应该是
$news .=