Re: how to assign a parsed file to a variable?
| From: | Chris Adams | Date: | Tue, 27 Jun 2000 01:11:12 +0000 |
| Subject: | Re: how to assign a parsed file to a variable? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3258@lists.php.net to get a copy of this message | ||
> is no. So I repost it again and see if it can be done by PHP...
>
> GOAL: 1) parse an external file with PHP+HTML codes
> 2) assign the result string to a variable instead of displaying
> directly on the PHP script
Easy with PHP4:
flush();
ob_start();
include("my_external_file.ph[");
$GeneratedHTML = ob_get_contents();
ob_end_clean();
// do something with Generated HTML here