title: PHP/JS Ajax - Displaying the PHP page as it loops through array
body: <p>I have a page, videos.php, that loads a video feed through Ajax. On the php ajax page, video_feed_ajax.php, it looks through an array creating a  object for each video. However, the current way I have the JS written, it only displays the video_feed_ajax.php when its completley loaded (when its looped through the entire array).
  ->Is there a way to display the video_feed_ajax.php each time it goes through the loop, so the videos are shown as it loops through instead of just at the end?</p>
  
  <p>The portions of my JS that apply:</p>
  
  <pre><code>xmlhttp.onreadystatechange=stateChangedUsersAddVideoFeed;
  xmlhttp.open("GET",url,true);
  xmlhttp.send(null);
  
  function stateChangedUsersAddVideoFeed()
  {
      document.getElementById("add_video_feed").innerHTML=xmlhttp.responseText;
      document.getElementById('add_video_feed_load_img').style.display='none'; 
  }
  </code></pre>