Forum Moderators: coopster
Can anyone tell me how to print/echo a variable to the browser while the script is still processing?
Example:
$n = 0;
while ($n < 100) {
echo $n;
$n++;
}
If I do this, then all of the data in the loop is presented to the user when the script finishes.
How do I make the script print each variable as soon as it is processed?
Thanks!
....
$n = 0;
while ($n < 100) {
echo $n;
flush();
$n++;
}
-sned