I have created a table on my website populated by database entries using php. What I want to do for aesthetic purposes is to have every second row to be empty and have a gap between each row. The below is my code so far.
$sql = "SELECT id, tablename, numseats, person FROM confirms";
$result = $conn->query($sql);
?>
<table id="Confirms" border ="2" style="length:900px;width:350px;">
<thead>
<tr style= "background-color: #A4A4A4;">
<td>Booking ID:</td>
<td>Table No.:</td>
<td>No. of Seats:</td>
<td>Person:</td>
</tr>
</thead>
<tbody>
<?php
while( $row = $result->fetch_assoc()){
echo
"<tr>
<td>{$row['id']}</td>
<td>{$row['tablename']}</td>
<td>{$row['numseats']}</td>
<td>{$row['person']}</td>
</tr>\n";
}
?>
</tbody>
</table>
Everything is functioning correctly at the moment and there is no php problem. It's just purely an appearance question. Thanks.