title: PHP Sleep but execute whats before sleep
body: <p>So I need a little help, is there a better way to have php wait before executing the next line of code?</p>
  
  <p>I tried:</p>
  
  <pre><code>$response = $_POST[response];
  echo "&lt;/br&gt;".$response;
  if (strpos($response,'no') !== false) {
      sleep(2);
      echo "&lt;/br&gt;";
      echo 'Why not?';
  }
  </code></pre>
  
  <p>But this method does not display the </p>
  
  <pre><code>echo "&lt;/br&gt;".$response;
  </code></pre>
  
  <p>before it sleeps.
  It sleeps for the 2 seconds, then displays the response.</p>
  
  <p>How can I get it to echo $response, then wait 2 seconds before is says "Why Not"</p>
  
  <p>Thank you in advance.</p>