PHP issue with sleep() and redirect
<p>I have the following dumb code:</p>

<pre><code>&lt;?

echo "&lt;html&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div id='loading'&gt;&lt;p&gt;&lt;img src='loader.gif'&gt; Please wait 6 seconds...&lt;/p&gt;&lt;/div&gt;&lt;/html&gt;";
sleep(6);
header('Location: http://google.com/');

?&gt;
</code></pre>

<p>Why doesn't the HTML piece of code show up in the browser before sleeping 6 seconds and then redirecting? The codes doesn't output the HTML code at all, waits 6 seconds then sends me to the location. What do I do wrong?</p>
