Tuesday, November 8, 2011

Using the eval function in php, how do I format the string being ped into eval if it includes html and php?

Through answers I found that I need to use eval to process text stored in a database as php code. The problem is that when I try to process the string using eval, I get the error: Parse error: syntax error, unexpected '<' in D:\wamp\www\database\indexthink.php(82) : eval()'d code on line 1 I have tried everything and browsed the web but I can't seem to figure it out. Any help on how I need to format the text so that eval knows what is html and what is php is greatly appreciated. Also, are there any characters that I need to escape and how do I do that?

No comments:

Post a Comment