RE: [PHP] eval() question
| From: | Michael Sims | Date: | Wed, 21 Apr 2004 14:10:24 +0000 |
| Subject: | RE: [PHP] eval() question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184127@lists.php.net to get a copy of this message | ||
OrangeHairedBoy wrote:
> I would like to use eval() to evaluate another PHP file and store the
> output of that file in a string.
You could use output buffering to do this a bit more easily, I think:
ob_start();
include('colors.php');
$colors = ob_get_contents();
ob_end_clean();