safetybrick safetybrick - 5 months ago 5x
PHP Question

How do i display the output of a "while loop" in a table?

I don't even have an idea of where to start for this. I need to display 100 numbers in a table and would like to use a while loop to do so. is there a "shortcut" to doing this?


For a table you need some tags table, tr and td. The tr and td are in while loop and the value $i will print inside the td.

    $i = 1;
    while($i != 101){?>
    <tr><td><?php echo $i++;?></td></tr>
    <?php }?>