I was getting an error in PHP whereby I had written some PHP code for page content into my database when queried to the relevent page the php wasn't working. To get round this I used
Code: Select all
<?php eval('?>'.$page_content.'<?php'); ?>[text]Parse error: syntax error, unexpected $end in /home/server/public_html/thesite/index.php(43) : eval()'d code on line 4[/text]
If I remove the eval code bit and echo the $page_content the error goes but none of the php within the content taken from the database works, it's just written as undisplayed text on the source. I've checked for missing braces, brackets, parenthesis etc as well as semicolons, double quotes and single quotes.....none seem present and this did work flawlessly on WAMP.
Is there any other way round this?