Código PHP:
Ver original
<?php $cont = 0; $cont2 = 1; foreach($fv as $field) { echo $cont2."<input type='checkbox' name='chk' value='$field[cod_volcan]' id='volcan_$field[cod_volcan]'>".$field['nom_volcan']."<input type='text'id='text_$field[cod_volcan]' name='volcan_$field[cod_volcan]' value='0'/>"."<br/>"; $cont++; $cont2++; } ?> Numero Volcanes <input name="num_volcanes" type="text" id="fec_ini_actividad" value="<? echo $cont;?>" /> <br/> Todos: <input type='checkbox' id='chk_todos' />