我不知道为什么,但我在这一行遇到错误:$row = mysql_fetch_array($run_games)){
这是代码:
<div class='topnav'> <!--Start of the Top Navigation-->
<?php
include("includes/connect.php");
$select_games = "SELECT * FROM games";
$run_games = mysql_query($select_games);
$row = mysql_fetch_array($run_games)){
$game_category = $row['game_category'];
?>
<!--some links here with the variable of "game_category"-->
<?php } ?>
</div> <!--End of the Top Navigation-->
请帮助我:(
最佳答案
应该是..
while($row = mysql_fetch_array($run_games))
{
echo $game_category = $row['game_category'];
}
您需要循环遍历结果集!
关于PHP MySQL 可能存在语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21761499/