I need to create a grid of 8 elements with the name of the items, the quantity and the price with random numbers, I have done this, but I do not know how to use the while loop to form the grid.
<table>
<tr><td>Nombre</td><td>Cantidad</td><td>Precio</td></tr>
<?php
$a = 0
while($a<=8){
echo "<tr>
<td>Nombre".$a."</td>
<td>50</td>
<td>".(rand(1,100))."</td>
</tr>";
a = ++;
}
?>
The loop has to be yes or if a while does not allow me to use for.