I notice that when I set my scripts to run a HUGE while loop (e.g. for($i=0;$i<10,000;$i++) ), the echos within the while loop prints out only after the loop is finished. So, results are delayed until the loop is completed.
As a result, I sometimes wonder if my script crashed. Is there a way to force the statement to print on my browser while the script is executing? (instead of having to wait until it is done)
Have you tried to use flush(), it flushes the output buffer. This should handle your problems:
for($i=0;$i<10,000;$i++) { echo $i; flush() }
If it does not try and change your to reflect this:
for($i=0;$i<10,000;$i++) { print $i; flush() }
nope .. IE still buffers all the content until the script stops running =(
Wei Hong you should define a function ,and place the function in a loop in the function you can write $sql="seclect * from your $tablename where ... limit by $start ,$limit"; and in the loop you can define a variable $i=0; $i+=$limit;?> //and call the functiom <input type="submit" name="button1" value="..." onclick =<? function($dbname,$tablename,$i,$limit)?>> and that will be solve your problem.