Re: Looping?

From: Date: Fri, 14 Dec 2001 12:42:40 +0000
Subject: Re: Looping?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77732@lists.php.net to get a copy of this message
On Fri, 2001-12-14 at 13:37, Tony Arnold wrote: Hi > function start($times) > { > for...loop starts here... > { <-- notice only one bracket. > } I guess you're only going to get parsing errors this way. maybe this could work (if i'm guessing what you need): function start() { ob_start(); } function end($number_of_times) { $html=ob_get_contents(); ob_end_clean(); for ($i=1; $i < $number_of_times) { echo $html; } } <?php start(); ?> html_come_here <?php end(10); ?>

« previous php.general (#77732) next »