title: PHP ob_start & flush - print and clean text in loop
body: <p>Is it possible to print text on the screen using ob_start() &amp; flush() and finally clean this text?</p>
  
  <p>Now I have something like that:</p>
  
  <pre><code>&lt;?php
  ob_start();
  
  ob_end_flush(); flush(); ob_flush();
  for($i = 0; $i&lt;100; $i++)
  {
      echo $i.'&lt;br&gt;';
      flush();
      ob_flush();
  }
  
  ob_end_flush();
  ?&gt;
  </code></pre>
  
  <p>and when I execute this code, I get something like that:</p>
  
  <pre><code>0
  1
  2
  3
  4
  5
  6
  7
  8
  ...
  </code></pre>
  
  <p>But I want echo current key and clean them:</p>
  
  <pre><code>0
  ... (clean "0")
  
  1
  ... (clean "1")
  
  2
  ... (clean "2")
  </code></pre>
  
  <p>Finally I would like to have only one number on the screen. Is it possible in PHP?</p>
  
  <p>Thanks.</p>