Can you arrange 3 table rows to display inline, so that after every 3 rows the table will automatically start on a new line and continue like this indefinitely?
<?php
$addon_name = $_SESSION['Add_On_OpName'];
mysqli_report(MYSQLI_REPORT_INDEX); //fixes a common PHP error
$prod_sel = $dbc->query("SELECT *
FROM Add_On
WHERE Add_On_OpName = '$addon_name'");
$prod_sel->data_seek(0);
while ($output = $prod_sel->fetch_assoc())
{
$prod_run .= $output['Add_On_OpName'] . $output['Prod_Name'] . $output['Add_On_Price'] . $output['Add_On_Select'] . '<br>';
$_SESSION['Add_On_OpName'] = $output['Add_On_OpName'];
$_SESSION['Prod_Name'] = $output['Prod_Name'];
$_SESSION['Add_On_Price'] = $output['Add_On_Price'];
$add_on_id = $output['Add_On_ID'];
echo "
<table style='width:100%'>
<tr>
<td id='red_circle'><a id='del' href='delete.php?delete=" . $add_on_id . "'>×</a></td>
<td><p id='session'>" . $_SESSION["Prod_Name"] . " + " . $_SESSION["Add_On_Price"] . " </p)</td>
</tr>
</table>
";
}
?>
CSS
table {
width:100%;
}
tr {
display:inline-block;
width:33%;
margin:0;
padding:0;
}
td {
display:inline-block;
width:20%;
margin:0;
padding:0;
}