real time output in php
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5763796/how-to-make-for-loop-real-time-in-php">How to make For Loop Real Time in PHP</a>  </p>
</blockquote>



<p>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.</p>

<pre><code>set_time_limit(0);
$i = 0;
while(1) {
    $i++;
    if ($i%10 == 0)
        echo 'Salam';
}
</code></pre>

<p>How can I have real time output?I mean the script is not ended yet,but it echoed somethings.</p>
