This is naturally output in HTML. The question is how to make the tag

<input type="text" name="1"/> 

with each iteration of the foreach loop just added 1 in the name attribute

  <?foreach($result as $request):?> <tr> <td><?=$request['name']?> <?=$request['surname']?></td> <td><input type="text" name="1"/><input type="hidden" name="<?=$request['id']?>"/> </td> </tr> <?endforeach?> 

    1 answer 1

      <?foreach($result as $request):?> <tr> <td><?=$request['name']?> <?=$request['surname']?></td> <td><input type="text" name="<?= $a += 1?>"/><input type="hidden" name="<?=$request['id']?>"/> </td> </tr> <?endforeach?> 
    • sorry, that I answered myself, well, maybe the Kamu buit is interesting - Zow
    • one
      @zow This is allowed. If everything answered correctly, you are even supposed to have a plusG =)) - BomBom
    • just before the cycle, make a=0; - DemoS
    • Only $ a before the cycle, announce, and then notice a notice, at least - kemerov4anin
    • Ok, good - Zow