RE: [PHP] Can you read a parsing PHP page's results
| From: | John W. Holmes | Date: | Tue, 12 Nov 2002 23:39:12 +0000 |
| Subject: | RE: [PHP] Can you read a parsing PHP page's results | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124098@lists.php.net to get a copy of this message | ||
> Is there anyway at all of reading the results of a parsing PHP page
from
> within that same PHP page itself. In other words can you read the HTML
> code
> it's going to create. I know that you can use regular expressions to
parse
> the HTML page manually swapping variable content as you would with
most
> any
> template system... I guess I am asking if you can get the results of
an
> echo
> statement. If I had to write it in pseudo code it would be this:
>
> $htmlCode = echo $myPHPcontent;
>
> I find it highly unlikely but I thought I'd toss it out to those who
know.
You can do it with output buffering.
http://www.php.net/manual/en/ref.outcontrol.php
---John Holmes...