title: Saving the result of an included PHP script as a variable
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5451287/capture-stdout-from-included-file-to-variable">Capture STDOUT from included file to variable</a>  </p>
  </blockquote>
  
  
  
  <p>OKAY, perhaps this isn't worded as well as it could be...</p>
  
  <p>This is what I want to do: I want to include the resulting source code of an executed PHP file into another PHP file, so that it can be manipulated and reused. The resulting output needs to incorporate the values of several $_GET variables, and the to-be-included PHP file's execution is dependent upon their values. So I need the resulting source code (what you'd see when you go to "View Source" in your browser) of a file like: "index.php?page=1&amp;id=1&amp;etc=something" to be included into another PHP file ... any thoughts?</p>
  
  <hr>
  
  <p>Is there a way to include a PHP file, and then save the result of that file's execution into a variable in the PHP file that included it, so as to be further used? Thanks in advance...</p>