On 7/5/06, Ken Kixmoeller (j/s) <[EMAIL PROTECTED]> wrote:
I need to do the same thing in PHP. The PHP eval() function seems
like the right one from the description, but I can't get it to work
without an error (parse error, unexpected $end ... It seems to want
to eval() a whole script.)
From http://us2.php.net/manual/en/function.eval.php
<?php
$string = 'cup';
$name = 'coffee';
$str = 'This is a $string with my $name in it.';
echo $str. "\n";
eval("\$str = \"$str\";");
echo $str. "\n";
?>
The above example will output:
This is a $string with my $name in it.
This is a cup with my coffee in it.
--------------------
If that's not working, yes, you should use an array, either an ordered
one or an associative one, or both.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.