siguro gawa ka nalang ng table na nag hahandle nung seat number and reservation status, then upon generating HTML, lagyan mo ng condition if that seat is already reserved.
example: you have a table in you database na parang ganito
Code:
+------------+-------------+-------------+
| bus_number | seat_number | is_reserved |
+------------+-------------+-------------+
| 12345 | 1 | 0 |
| 12345 | 2 | 1 |
| 12345 | 3 | 0 |
| 12345 | 4 | 1 |
+------------+-------------+-------------+
then create the HTML table and add a conditional statement.
I think the basic implementation would be like this.
HTML:
<table>
<!--- loop ka sa list ng seats --->
<tr>
<!--- check mo kung ung seat na un is reserved (e.g: if ($is_reserved == 1)) --->
<td>Reserved</td>
<!--- else: --->
<td>Available</td>
<!--- end condition --->
</tr>
<!--- end loop here --->
</table>