https://www.w3schools.com/php/func_mysqli_fetch_assoc.asp
https://mrszeto.net/ict/web-ict/student2024.sql
";
while ($row = mysqli_fetch_assoc($result)) {
echo "
{$row["id"]} - {$row["class"]} {$row["name"]}";
}
echo "";
//----------
mysqli_data_seek($result,0);
echo "";
while ($row = mysqli_fetch_row($result)) {
echo "- {$row[0]} - {$row[4]} - {$row[2]} {$row[1]}
";
}
echo "
";
mysqli_free_result($result);
mysqli_close($con);
?>