Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // $l representará o número de linhas que existem
  2. $l = -1;
  3.  
  4. // $inst2 carrega: SELECT nome, prova1, prova2, simulado FROM alunos
  5.  
  6. while($dado = mysqli_fetch_row($inst2)) {
  7.  
  8. $l+=1;
  9. $dados[] = $dado;
  10.  
  11. }
  12.  
  13. for ($x=0; $x<=$l; $x++) {
  14.  
  15. echo "<tr>";
  16.  
  17. for ($y=0; $y<=3; $y++) {
  18.  
  19. if ($dados[$x][$y] == NULL) {
  20.  
  21. echo "<td><input type="text" size="6"></td>";
  22.  
  23. } else {
  24.  
  25. echo "<td>".$dados[$x][$y]."</td>";
  26. }
  27. }
  28. }
  29. echo "</tr>";
  30. echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement