Possible Duplicate:
How to make For Loop Real Time in PHP
I think when we run php script,web server wait until end of script and after that will return output. for example if following script doesn’t have output.
set_time_limit(0);
$i = 0;
while(1) {
$i++;
if ($i%10 == 0)
echo 'Salam';
}
How can I have real time output?I mean the script is not ended yet,but it echoed somethings.
Have a look at flush().