On 29 January 2004 12:51, Dave Carrera wrote: > Hi List, > > I have a test function who's aim is to take an array an do something > which each value of the array and show the result on screen one at a > time. > > --- Test Function Code --- > > function TestFunc(){ > $cnt = array(1,2,3,4,5,6,7,8,9,10); > $i=0; > > while($i <=count($cnt)){ > set_time_limit(2); > echo $cnt[$i].str_repeat(" ", 300) . "<br />";; > ob_flush(); > flush(); > $i++; > } > > --- End ---
Your understanding of ob_flush() and flush() looks right. However, at the moment you've got nothing in there to insert a delay between the echos, so it'll all just be whizzing out at top speed. Try inserting a sleep(1) into the body of the loop, to wait for 1 second on each iteration. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php