Posted by Colin McKinnon on 09/24/06 15:36
iulian.ilea wrote:
>
> By using eval I want to eval $v and get the result returned by ee
> stored in $stri. How woul you do?
Exactly the way its written in the manual (http://uk2.php.net/eval)
$v = 'e("name")';
$v="\$stri = " . $v . ";";
eval($v);
print $stri;
Eval (and storing code in a database) is very dangerous unless you know what
you're doing - and anyone who know what they were doing would RTFM first.
You have not done that therefore we must assume you don't know what you are
doing.
And if you did know what you were doing you would be trying very hard to
avoid the scenario where this is the solution.
C.
Navigation:
[Reply to this message]
|