First time programming a simple database. But I cant figure out how to solve this error:
Parse error: syntax error, unexpected '$row' (T_VARIABLE) in W:...\index.php on line 39
This is my script..
$result = mysqli_query($link,"SELECT * FROM studenten");
echo "<table border='1'>
<tr>
<th>first name</th>
<th>last name</th>
<th>studentnummer</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
id = $row[id]; //this is line 39
echo "<tr>";
echo "<td>" . $row['voornaam'] . "</td>";
echo "<td>" . $row['studentnummer'] . "</td>";
echo "<td> <a href ='edit.php?id_student=$id'>Edit</a>";
echo "<td> <a href ='delete.php?id_student=$id'><center>Delete</center></a>";
echo "</tr>";
}
echo "</table>";
can someone help me?