How to include return values from a different file in a variable
<p>I can return a value from embedded php within the variable (as below), but in this case I would like to get the output of a php file e.g. result.php.</p>

<pre><code>var jsVar = "&lt;?php echo 'thisisfromphp' ?&gt;";
</code></pre>

<p>So running 'result.php' would produce a result to be returned. How could I grab this result from result.php and use it as the variable - I was thinking something like:</p>

<pre><code>var jsVar = "&lt;?php echo result.php ?&gt;";
</code></pre>

<p>P.S. I would embed the php code from result.php in the variable (as above) but it all gets to messy..</p>
