I'm using a basic ORDER BY name query from MySQL and i'm attempting to split the data Alphabetically into individual html tables / or add a line break... so for example it currently outputs like so:
Name
adam
angel
Bert
Bob
Chloe
Courtney
But i would like the output to be....
Name
adam
angel
Bert
Bob
Chloe
Courtney
What's the best way to add a line break or blank cell to make this happen?
I'm simply echoing the data at the moment:
$sql = "SELECT name FROM test ORDER BY name ASC";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo " <tr>";
echo "<li>" . $row['name'] . "</li>";
echo " </tr>";
}
} else {
echo "0 results";
}