codice HTML:
<table>
    <tr>
        <th>id:</th>
        <th>Slot time:</th>
        <th>staff id:</th>
    </tr>
";

if ($result->num_rows > 0) {
    // output data of each row
    while ($row = $result->fetch_assoc()) {
        echo '
        <tr>
            <td>$row["id"]</td>
            <td>$row["slot_time"]</td>
            <td>$row["staff_id"]</td>
        </tr>
        ';
    }
} else {
    echo "0 results";
}
$conn->close();

echo "</table>";