![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 237 Pomógł: 1 Dołączył: 8.02.2007 Ostrzeżenie: (10%) ![]() ![]() |
Hej,
Czy w PHP da się coś takie zrobić jak własna pętla? (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) Np. chciałbym sobie takie coś zrobić: repeat($x) { echo 'cos tam'; } Gdzie $x to ilość razy jaką ma się wykonać kod. |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 237 Pomógł: 1 Dołączył: 8.02.2007 Ostrzeżenie: (10%) ![]() ![]() |
Ale sie nie o to rozchodzi (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Chce mieć uniwersalne ... Czyli np. repeat(3) { $i++; } Albo: repeat(21) { $variable .= 'petla'; } |
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 18:30 |