title: Implementing long-polling with jQuery and PHP
body: <p>I want to build a chat, based on JavaScript (jQuery will be used for AJAX) and PHP.</p>
  
  <p>I've heard a good way of doing this is to use long-polling.</p>
  
  <p>I do understand the idea, but I don't know how to implement it on the server side.</p>
  
  <p>An infinite loop sounds like a bad idea.</p>