I have this dataTable
with a best-selling product top, but I do not want to give me the id of the table, but a loop from 1 to 10, how could I do it? Here I have my code:
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>#</th>
<th>Nombre</th>
<th>Categoria</th>
</tr>
</thead>
<tbody>
<?php if(!empty($productosmvendidos)):?>
<?php foreach($productosmvendidos as $pmv):?>
<tr>
<?php $i=1;?>
<td><?php echo $i+=1;?></td>
<td><?php echo $pmv->nombre;?></td>
<td><?php echo $pmv->categoria;?></td>
</tr>
<?php endforeach;?>
<?php endif;?>
</tbody>
</table>
Here the table:
Thank you very much already.