I have a while, and I wanted each loop to be added a different value in name, two two select fields.
Ex: First loop first field comes: WeeklyPlan1
First loop first field comes: WeeklyGirl2
Does anyone have any ideas how I can do this?
Below the code I have:
<?php
$i = 1;
while ($i <= 2) {
?>
<div class="container">
<div class="jumbotron">
<h1>Dados da primeira Criança</h1>
<form action="">
<div class="semanas-e-periodos">
<div class="form-group">
<label for="exampleFormControlSelect1">Semana</label>
<select class="form-control" id="exampleFormControlSelect1" name="semanacrianca1">
<option value="1semana">1º Semana</option>
<option value="2semana">2º Semana</option>
<option value="3semana">3º Semana</option>
<option value="4semana">4º Semana</option>
</select>
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Semana</label>
<select class="form-control" id="exampleFormControlSelect1" name="qtdcriancas">
<option value="1">1 Criança</option>
<option value="2">2 Crianças</option>
<option value="3">3 Crianças</option>
<option value="4">4 Crianças</option>
<option value="5">5 Crianças</option>
</select>
</div>
</div>
</form>
</div>
<?
$i++;
}
?>