HI, I for the life of me can not figure this out, I need to add a table to PHP doc, the table is 4 columns, and to have automatic number of rows, depending on the amount of data coming from the data base.
I will post my code below, I have tried adding <td> tags but this makes the data go in a vertical line. I know HTML etc, any help greatly appreciated.
My php code is this:
echo '<div class="border_waiting">
<h1><strong style="font-size: 54px">ED Waiting Room</strong></h1>
<div class="waitingroomborder">';
foreach ($waiters as $name => $time){
echo "<div style='text-align:left' class='waitinguser' align=left;><i class='fa fa-user fa-1'></i><span id='username'>" . $name
. "</span><span id='waitingtime'>" . $time . "</span></div>";
}
echo '<div class="clear"></div>
</div>
</div>';
Below is another method I have tried, it gives all across the top and 13 columns (as there is presently 13 pieces of data to show), also they are not aligned.
So I am stumped on how to do it as 4 columns per row, ad align the data vertically and Horizontial.
if you click here https://www.dropbox.com/sh/1pkwpi17ptbc331/AAB4s48d6bQddb5Nl1u4GH8Sa?dl=0
You will see a screen shot of the way the code is displaying
<table>
<tr>
<th>
<?PHP
foreach ($waiters as $name => $time){
echo "<td><div style='text-align:left' class='waitinguser' align=left;><i class='fa fa-user fa-1'></i><span id='username'>" . $name
. "</span><span id='waitingtime'>" . $time . "</span></td></div>";
}
?>
</th>
</tr>
I appreciate your help.