Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Funkcja i tabela, o co biega?
Gifter
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


Jestem raczkujacy i od 2 tyg mam zajecia z php, dostalem takie zadanie:

tabela w php o wymiarach NxM

Jak wogole to ma wygladac? Moze mi ktos pomoc HELP (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

Ten post edytował Gifter 14.10.2006, 21:09:39
Go to the top of the page
+Quote Post
Nilhir
post
Post #2





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 2.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Ogólnie chodzi prawdopobnie o to(wiem, że brzydko ale chodzi o pokazanie o co tu chodzi (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) )
  1. <?php
  2. function tabela($kolumny, $wiersze)
  3. {
  4. echo '<table>';
  5. for ($i = 0; $i <= $wiersze; $i++)
  6. {
  7. echo '<tr>';
  8. for ($j = 0; $j <= $kolumny; $j++)
  9. {
  10. echo '<td></td>';
  11. }
  12. echo '</tr>';
  13. }
  14. echo '</table>';
  15. }
  16. ?>


Edit: poprawione (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Tak to jest jak sie naraz gra w WoWa i lata po forach ;]

Ten post edytował Nilhir 14.10.2006, 20:48:57
Go to the top of the page
+Quote Post
Gifter
post
Post #3





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


sorka za pytanie ale co zrobic aby ten skypt zadzialal? bo wkleilem go do pliku php ale i tak nie dziala na mojej stronce :/ strona ma pbsluge php
Go to the top of the page
+Quote Post
Nilhir
post
Post #4





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 2.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


dajesz po tym kodzie np
  1. <?php
  2. tabela(10, 10);
  3. ?>


BTW przeczytaj sobie lepiej jakiś kurs prosty kurs php bo jak będziesz miał inne zadania a takiego nie zrobisz to nie będzie dobrze ;]
Go to the top of the page
+Quote Post
Gifter
post
Post #5





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


heh i widze biale tło kurde czy to wina mojego kompa bo glupieje normalnie :/
Go to the top of the page
+Quote Post
Nilhir
post
Post #6





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 2.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


bo to ma tworzyć miałe tło ;/
jak chcesz coś innego to daj sobie
  1. <?php
  2. function tabela($kolumny, $wiersze)
  3. {
  4. echo '<table>';
  5. for ($i = 0; $i <= $wiersze; $i++)
  6. {
  7. echo '<tr>' . $i;
  8. for ($j = 0; $j <= $kolumny; $j++)
  9. {
  10. echo '<td> ' . $j . ' </td>';
  11. }
  12. echo ' </tr>';
  13. }
  14. echo '</table>';
  15. }
  16. ?>
Go to the top of the page
+Quote Post
Gifter
post
Post #7





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


o o o o o o (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) podziękowal (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) (IMG:http://forum.php.pl/style_emoticons/default/guitar.gif) (IMG:http://forum.php.pl/style_emoticons/default/guitar.gif) (IMG:http://forum.php.pl/style_emoticons/default/guitar.gif)
Go to the top of the page
+Quote Post
lopik
post
Post #8





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 7.07.2006

Ostrzeżenie: (0%)
-----


  1. <?php
  2. function tabela($kolumny, $wiersze)
  3. {
  4. echo '<table>';
  5. for ($i = 0; $i <= $wiersze; $i++)
  6. {
  7. echo '<tr>';
  8. for ($j = 0; $j <= $kolumny; $j++)
  9. {
  10. echo '<td>A </td>';
  11. }
  12. echo '</tr>';
  13. }
  14. echo '</table>';
  15. }
  16.  
  17. echo tabela(10, 10);
  18. ?>


Masz (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

//


Sorry że sie wepchałem (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

Ten post edytował lopik 14.10.2006, 21:08:22
Go to the top of the page
+Quote Post
Gifter
post
Post #9





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


dziękuweczka Panowie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) a jaki kurs php w internecie polecacie (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) moze jakis link (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) dzieki jeszcze raz!!
Go to the top of the page
+Quote Post
Nilhir
post
Post #10





Grupa: Zarejestrowani
Postów: 28
Pomógł: 0
Dołączył: 2.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


http://forum.php.pl/index.php?showtopic=12816&st=0
ech... temat przyklejony...
Go to the top of the page
+Quote Post
Gifter
post
Post #11





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 14.10.2006

Ostrzeżenie: (0%)
-----


okej THX jeszcze raz
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.08.2025 - 03:58