My code currently outputs the row by row from the information collected by an sql query.
The output looks like this at the moment:
First Name: test2 - Last Name: test2 - Appointment Time: 12041312
First Name: Jim - Last Name: Bob - Appointment Time: 13051130
First Name: John - Last Name: Smith - Appointment Time: 13051230
I am trying to sort it into a HTML table. Any help appreciated.
Code for output:
if (mysqli_num_rows($result) > 0) {
    while($row = mysqli_fetch_assoc($result)) {
        echo "First Name: " . $row["FirstName"]. " - Last Name: " . $row["LastName"]. " - Appointment Time: " . $row["AppTime"]. "<br>";
    }
} else {
    echo "No results, please try again";
}


ORDER BY columnameto the query. Let MySQL do all the work for youecho "First Name: $row[FirstName] - Last Name: $row[LastName] - Appointment Time: $row[AppTime]<br>";