At 01:37 PM 12/14/2001 +0100, Tony Arnold wrote: >start('10'); > html-code... I want this to be repeated 10 times. >end(); > >This doesn't work but this is how I want it! :-) Anyone?
How about using alternate syntax? For example: <? for ($i=0; $i < 10; $i++): ?> html-code <? endfor; ?> http://www.php.net/manual/en/control-structures.alternative-syntax.php Alternatively, this COULD work, but I haven't tested it: function start($loopcount) { eval("for (\$i; \$i < $loopcount; \$i++) {"); } function end() { eval("}"); } http://www.php.net/manual/en/function.eval.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]