fork download
  1. <?php
  2.  
  3. $numerolinhas = 4;
  4. $numerocolunas = 6;
  5. $linhas = "";
  6. $linhas = " <tr>\n";
  7. $controws = 0;
  8. $colunas = "";
  9. $colunas = " <td></td>\n";
  10. $th = " <th></th>\n";
  11.  
  12. echo "<table>\n";
  13. for ($i = 0; $i < $numerolinhas; $i++) {
  14. echo $linhas;
  15.  
  16. if ($i==0){
  17. for ($k = 0; $k < $numerocolunas; $k++) {
  18. echo $th;
  19. }
  20. echo " </tr>\n<tr>\n";
  21. }
  22.  
  23.  
  24. for ($x = 0; $x < $numerocolunas; $x++) {
  25. echo $colunas;
  26. }
  27. echo " </tr>\n";
  28. $th="";
  29. }
  30. echo "</table>";
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
<table>
 <tr>
  <th></th>
  <th></th>
  <th></th>
  <th></th>
  <th></th>
  <th></th>
 </tr>
<tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
 </tr>
 <tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
 </tr>
 <tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
 </tr>
 <tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
 </tr>
</table>