title: Foreach PHP Loop optimization?
body: <p>I've below code</p>
  
  <pre><code>&lt;?php
  while($result=$stmt-&gt;fetch())
  {
  $lookup[] = $result['phost'];
  }
  foreach ($lookup as $host) {
  echo '&lt;tr&gt;&lt;td&gt;' . $host . '&lt;/td&gt;&lt;td&gt;' . $reverse_ip . '.' . $host . '&lt;/td&gt;';
    if (@checkdnsrr($reverse_ip . "." . $host . ".", "A")) {
         echo '&lt;td&gt;&lt;span class="badge bg-red"&gt;Listed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;';
    } 
    else {
         echo '&lt;td&gt;&lt;span class="badge bg-yellow"&gt;Not Listed&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;';
    }
  }
  ?&gt;
  </code></pre>
  
  <p>I've around 60+ records in table of column(phost) which i'm getting from SQL Query and saving all results in an array $lookup but my problem is, after submitting the form, it took so much time to load and i want to show the result one by one in table row with some nicely progress bar.</p>
  
  <p>Please Help!</p>