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.
var jsVar = "<?php echo 'thisisfromphp' ?>";
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:
var jsVar = "<?php echo result.php ?>";
P.S. I would embed the php code from result.php in the variable (as above) but it all gets to messy..