Torsten is right.  eval() works great ... and so does having your php code in the 
database :-)

>>"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>> Hi there,
>>> I thought it would be a great idea to store the code of nearly all my web
>>> pages in "text" fields of a mysql database.
>>> Now I've got the problem that I want to use php in those pages.
>>> Let's say $row["content"] contains the string "<? echo 'Hello World!' ?>".
>>> Then echo $row["content"] only produces the unparsed <? echo 'Hello
>>World!'
>>> ?> which effectivly displays nothing, because the browser doesn't know the
>>> "<?" tag. How can I tell PHP to parse this string before displaying it???
>>>
>>> Thanks for any suggestions...
>>
>>This can be done with eval():
>>http://de.php.net/manual/en/function.eval.php
>>
>>Take a look at the user comments there, especially regarding the inclusion
>>of <? and ?>.
>>
>>Regards, Torsten


Reply via email to