using php within setTimeout in javascript
<p>I have an issue using my php code within the javascript function setTimeout. The code is in a php file, but instead of acting like it should and waiting the five minutes to send the user to the index page of my website, it just does it instantly. Any ideas?</p>

<p>Here's the code:</p>

<pre><code>&lt;script&gt;
  setTimeout(function() { &lt;?php header( 'Location: /index.html' ); ?&gt; }, 300000);
&lt;/script&gt;  
</code></pre>
