title: Put results from .load() php file into Var
body: <p>I have a page that loads in "get-results.php" which loads the results into a div. This works great. However, I also need to grab a variable from the php file that is being loaded, so that I can re-include it in the .load() url, this way I can have the php file have the previous result for comparison.</p>
  
  <pre><code>$(".results").load("get-results.php" + "?userClicked=" + var1 + var2 + "&amp;prevresult=" + theResults);
  </code></pre>
  
  <p>In the "get-results.php" file, I have set</p>
  
  <pre><code>var theResults = "&lt;?php echo $result; ?&gt;";
  </code></pre>
  
  <p>Is there a way for me to access "var theResults" from the page that is loading it (outer page, not inner)? How can I get the Var from the file and put it into a Var in the outer file? Any pointers would be great thanks. </p>