Good afternoon, I have a code that loads a bd table, what I'm looking for is to take advantage of the cycle to be able to add and send it in an input.
<table class="table table-striped">
<thead>
<tr>
<th width="100">ID</th>
<th width="250">Codigo</th>
<th width="200">Item</th>
<th width="200">Precio</th>
</tr>
</thead>
<tbody>
<!-- Generamos el listado vaciando las variables de la consulta en la tabla -->
<?php
while($persona = $consulta->fetch_assoc()) //Creamos un array asociativo con fetch_assoc
//$precio_venta=$persona["precio"];
{
?>
<tr>
<td><?php echo $persona['id']; ?></td>
<td><?php echo $persona['codigo']; ?></td>
<td><?php echo $persona['item']; ?></td>
<td><?php echo $persona['precio']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>