|
Posted by Rik on 11/21/67 11:48
Alan Little wrote:
> Carved in mystic runes upon the very living rock, the last words of
> Baron Samedi of comp.lang.php make plain:
>
>> $text = "(2==3)";
>
> No parentheses.
>
>> eval('\$condition = ($text)? true : false;');
>
> Double qoutes, man. Double quotes.
Yup,
eval("\$condition = ($text)? true : false;");
or
eval('$condition = ('.$text.')? true : false;');
For quoting-education:
http://nl2.php.net/manual/en/language.types.string.php
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|