0
Well, the following is what I want is to show all the teams, from one table, in that table each row corresponds to one team. However what I wanted to do was show 1 <select>
for each team, that is, if there are 4 teams in the comic book I want 4 <select>
and each with the 4 teams to choose from.
I have a problem that only one of <select>
is that it gets filled.
My code is this::
<?php
$procura3 = mysqli_query($link, "SELECT * from $tabelatorneio");
while($contador < 4){
?>
<select>
<?php
while($array3 = mysqli_fetch_array($procura3)){
?>
<option value="<?php echo $array3["nomeequipa"]; ?>">
<?php echo $array3["nomeequipa"]; ?>
</option>
<?php
}
?>
</select>
<?php
$contador ++;
}
?>
What I did wrong, to only show 1 select with all teams?
The error continues, but now only 4 inputs appear but without the names of the football teams.
– Gonçalo
I got it! Thank you.
– Gonçalo
Replace <?= with <?php echo
– user26552
If I want to assign an input text to every two selects how can I do?
– Gonçalo