Hi,
I'm having problems eval'ing content from a mySQL DB.
This is for a CMS system I have which lets users add their own PHP to the pages, which is stored in the database.
Some example database content would be:
The date is <? echo(date()); ?>
I've tried many different eval methods, the only working being:
eval("?>".$value"<?");
The problem here is that it is automatically echo'ed.
My end result is:
ob_start();
eval("?>".$value"<?");
$string = ob_get_contents();
ob_end_clean();
However this is really inefficient and seems like too much of a hack.
Surely there has to be an easier way to store PHP (with tags) in a database (or a better way to do my CMS)?
Thanks