Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // $l representará o número de linhas que existem
- $l = -1;
- // $inst2 carrega: SELECT nome, prova1, prova2, simulado FROM alunos
- while($dado = mysqli_fetch_row($inst2)) {
- $l+=1;
- $dados[] = $dado;
- }
- for ($x=0; $x<=$l; $x++) {
- echo "<tr>";
- for ($y=0; $y<=3; $y++) {
- if ($dados[$x][$y] == NULL) {
- echo "<td><input type="text" size="6"></td>";
- } else {
- echo "<td>".$dados[$x][$y]."</td>";
- }
- }
- }
- echo "</tr>";
- echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement