how to parse php code stored in databases?
| From: | Florian Wagner | Date: | Sat, 08 May 2004 10:56:59 +0000 |
| Subject: | how to parse php code stored in databases? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-34304@lists.php.net to get a copy of this message | ||
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...