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 form the grid.
<?php
$i = 0;
while ($i == 8) {
$i = rand(1,100);
echo $i."<br>;
$i++;
}
?>
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 form the grid.
<?php
$i = 0;
while ($i == 8) {
$i = rand(1,100);
echo $i."<br>;
$i++;
}
?>
I guess you want something like this:
<table>
<tr><td>Nombre</td><td>Cantidad</td><td>Precio</td></tr>
<?php
$i = 1;
while ($i <= 8) { echo $i++
echo "<tr>
<td>Nombre".$a."</td>
<td>50</td>
<td>".(rand(1,100))."</td>
</tr>";
}
?>
</table>