Hi guys,

My current task involves passing a string into a function that is able to
reference variables defined within that function for the final output. The
idea is that a function iterates through objects and eval's the string so
that the objects data (name etc) is substituted in the string.

Currently I have something like this:

$someVar = "<br>testing for node - wootah, \$evalTestArr[TAG_PAGENAME]"

....
then in some other function that gets passed this string
...

$evalTestArr[TAG_PAGENAME] = "hello anna marie gooberfish!";
$str = $someVar;
eval("\$str=\"$str\";");

if I echo it out, the substitution is not done.

any thoughts? I'm reading through
http://www.php.net/manual/en/function.eval.php but yet to be inspired.




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

Reply via email to