diff --git a/anser.php b/anser.php index 88668f7..5bd8ee3 100644 --- a/anser.php +++ b/anser.php @@ -86,7 +86,7 @@ for($i = 1;$i <= $p;$i++){ $q = floor($row['ap_'.$i] / 10); $a = floor($row['ap_'.$i] % 10); - $result = mysqli_query($con,"SELECT * FROM Persons WHERE num='$q'"); + $result = mysqli_fetch_array(mysqli_query($con,"SELECT * FROM Persons WHERE num='$q'")); echo "
正确答案是: ".$result[$list[$result['answer']]]."
你的答案是: ".$result[$list[$a]]."
"; //echo "\n\n\n\n\n\n\n\n