Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> prosta pętla - jak zrobić, np od 0 do 100 ten sam napis
niko
post
Post #1





Grupa: Zarejestrowani
Postów: 109
Pomógł: 0
Dołączył: 2.06.2005

Ostrzeżenie: (30%)
XX---


cześć mam problem

chce żeby powtórzyło mi np 100 razy to samo zdanie ale nie chce tego pisac ciągle

poprostu echo"jakieś zdanie"; i to chciałem dać w prostej pętli żeby pisało puki licznik nie będzie równy 100


może ktoś mi pomóc ?
Go to the top of the page
+Quote Post
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




http://pl.php.net/manual/pl/control-structures.for.php
http://pl.php.net/manual/pl/control-structures.while.php

ps: manual nie gryzie (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post
Wave
post
Post #3





Grupa: Zarejestrowani
Postów: 332
Pomógł: 6
Dołączył: 13.01.2005

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


str_repeat?
Go to the top of the page
+Quote Post
eques
post
Post #4





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 13.02.2006

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


Pętla while:
$licznik=1;
while ($licznik<=100) {
echo 'jakies zdanie<br>';
$licznik++;
}
Go to the top of the page
+Quote Post
nospor
post
Post #5





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




@eques to milo, ze lubisz pomagac, ale czytaj posty wyzej. To co napisaleś, jest w jednym z moich linkow. A to co ty wlasnie zrobiles, podchodzi pod nabijanie postow (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

No i uzywaj bbcode...
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: 24.08.2025 - 13:32