- Edited
I'm having a problem when getting data from the database and outputting it into a table. The data comes out but its not positioned properly, I have looked at my code an cannot see where I have gone wrong. Any help is appreciated.
![if ($result->num_rows > 0) {
echo "<table> <tr><th>First Name</th><th>Last Name</th><th>Course</th><th>Grade Code</th><th>Grade Percentage</th></tr";
while($row = $result->fetch_assoc()) {
echo "<tr><td>".$row["studentfname"]."</td><td>".$row["studentlname"]."</td><td>".$row["course"]."</td></tr>".$row["gradecode"]."</td><td>".$row["gradep"]."</td></tr>";]