Re: eval
| From: | Joona Kulmala | Date: | Fri, 01 Aug 2003 06:50:38 +0000 |
| Subject: | Re: eval | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157889@lists.php.net to get a copy of this message | ||
Decapode Azur wrote:
Is it possible to put PHP code in eval ? Or just vars ? <?php $string = 'The result of <?php $a=2; $b=3; $c=$a+$b; echo "$a + $b is $c"; ?>'; eval ($string); ?>It should go like: [code] eval('$var = "The result of"; $a=2; $b=3; $c = $a + $b; $var .= "$a + $b is $c";'); [/code] Just a question, what are you really trying to do? Cheers, Joona -- Joona Kulmala <joona@fiveam.org> PHP Finland