Decapode Azur wrote:

Is it possible to put PHP code in eval ?
Or just vars ?


$string = 'The result of <?php $a=2; $b=3; $c=$a+$b; echo "$a + $b is $c"; ?>';

eval ($string);


It should go like:


eval('$var = "The result of"; $a=2; $b=3; $c = $a + $b; $var .= "$a + $b is $c";');


Just a question, what are you really trying to do?

Cheers, Joona
Joona Kulmala <[EMAIL PROTECTED]>
PHP Finland

-- PHP General Mailing List ( To unsubscribe, visit:

Reply via email to