Capture output of php script into a variable?
Posted on 2006-10-26
I'm trying to compare the features of PHP to ASP.NET. One thing I do all the time in ASP.net is execute another page, grab the content, and use it in a variable. I'm trying to figure out how to do this in PHP.
Lets say I have the following two files:
In main.php, I want to execute subcontent.php, and grab the output into a variable. I'd rather not have to mess with URL's, which most of the examples I see involve doing. I just want to execute subcontent.php, and get all the output to a variable. This is not the same thing as using "include"!
Thanks for any help,