PDA

View Full Version : repeat sumthing # of times


AN-net
04-13-2004, 03:06 AM
how can i make sumthing repeat for a certain # of times? i was just wondering:)

Xenon
04-13-2004, 12:35 PM
a bit more specific infos about where and what to repeat ;)

if you mean a repeating bbcode, something like that has been released already.

if you mean a code, you should use a for loop

sabret00the
04-13-2004, 12:40 PM
i think he means a while loop

Xenon
04-13-2004, 12:41 PM
i think he means a while loop
hmm, for a certain number of times, a for loop should be used instead of while normally :)

AN-net
04-13-2004, 03:08 PM
can you give me an example of a for loop?

Xenon
04-13-2004, 03:52 PM
for ($i = 0; $i < 10; $i++)
{
echo $i;
}

this will echo 0123456789 :)