title: Echo 'string' while every long loop iteration (flush() not working)
body: <p>I have a loop that takes very long to execute, and I want the script to display something whenever the loop iteration is done.</p>
  
  <pre><code>echo "Hello!";
  
  flush();
  
  for($i = 0; $i &lt; 10; $i ++) {
      echo $i;
      //5-10 sec execution time
      flush();
  }
  </code></pre>
  
  <p>This does not display the echos until the entire script is completed. What went wrong?</p>