title: Display result of looping in single place
body: <p>Currently I need to do some looping result of calculation for every 5 second. Is there any code in HTML, PHP or JavaScript where I can display updating result in single place, not creating in new line. Below is example of code I'm working on in PHP:</p>
  
  <pre><code>&lt;?php   
  set_time_limit(0);
  ob_implicit_flush(true);
  ob_end_flush();
  
  $total=0;
  for ($i=1; $i&lt;980; $i++) {
  
  $total=$total+1;
     echo "The current number is".$total;
     echo '&lt;br&gt;';
     sleep(5);
  
  }
  
  ?&gt;
  </code></pre>