executing code within loop one by one?
<p>simply i have normal for loop</p>

<pre><code>for ($i = 0 ; $i&lt;='20' ; $i++)
{
    echo $i.'&lt;br /&gt;';
}
</code></pre>

<p>this simple loop work like this
do the completed loop then print the result
what i need to do is to print the result on time
so the output for example to be like this</p>

<pre><code>echo 0 ;
echo 1 ;
echo 2 ;
</code></pre>

<p>till the end of the loop
i tried</p>

<pre><code>for ($i = 0 ; $i&lt;='20' ; $i++)
{
    echo $i.'&lt;br /&gt;';
    sleep(1);
}
</code></pre>

<p>and unfortunately this not work either
its waited for 20 seconds then print the out at once
im very much in need to know if its possible to do the loop like the way i need </p>
