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 <[EMAIL PROTECTED]>
PHP Finland


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to