for($c=1;$c<=$num;$c++)
{
$row=mysql_fetch_array(mysql_query("SELECT * FROM `$quiztitle` WHERE id=$c"));
if($row['answer']==$_POST['answer'][$c]) // NOT WORKING
{
echo "correct";
echo "<br>";
}
else
{
echo "incorrect";
echo "<br>";
}
}
在它说“不工作”的行上,索引 [$c] 没有从循环中获取值。但是当我指定它并将其更改为 $_POST['answer1'] 时,它正在工作。什么是正确的语法?