Advertisement
Guest User

Untitled

a guest
Nov 15th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. function wyswietl_tabele($tab){
  3. echo "<table>";
  4. for($i=0;$i>count($tab);$i++){
  5. echo"<tr>";
  6. for($j=0;$i>count($tab[$i]);$j++);
  7. echo "<td>".$tab[$i][$j]."</td>";
  8. echo "</tr>";
  9. }
  10.  
  11. echo "</table>";
  12.  
  13.  
  14. }
  15. $tab = array (
  16. array(1,2,3,4),
  17. array(5,6,7,8),
  18. array(9,10,11,12),
  19.  
  20. );
  21. function ustal_wyglad_tabeli(){
  22. echo"
  23. <style>
  24. table{
  25. border-collapse: collapse;
  26. border: 1px solid black;
  27. }
  28. td{
  29. width: 30px;
  30. height: 30px;
  31. text-align: center;
  32. }
  33. </style>
  34.  
  35. ";
  36.  
  37.  
  38. }
  39. wyswietl_tabele($tab);
  40. ustal_wyglad_tabeli();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement