Run PHP code inside JavaScript? Would this be ok to use?
<p>I am not sure if a line of PHP could be run inside of a JavaScript function. For example:</p>

<pre><code>&lt;script language=javascript&gt;
var int=self.setInterval("message()",1000);
function message()
  {
&lt;?PHP mysql_query("SELECT * FROM example"); ?&gt;
  }
&lt;/script&gt;
</code></pre>

<p>I haven't tried to run this, but I don't think you can run PHP like this. Could anyone help. Could i run a PHP script inside a javascript function somehow without using a call to an outside PHP file through Ajax?</p>
