I've written the entire website in HTML and PHP but I ran into a small problem. After almost completing the website I was told to put all content in the database rather than just HTML. As I'm doing that I noticed that text with inline PHP variables doesn't get read when taken from the database.
Original Code:
<div>Hello <?php echo $World; ?></div>
New Code:
<div><?php getContent("title"); ?></div>
I have tried two ways of storing them in the database:
First method, text saved: Hello <?php echo $World; ?>
Which prints out Hello and ignores the variable.
Second method, text saved: Hello $World
Which prints out Hello $World instead of the value of $World
Other things I've tried:
Hello $$World - Hello $$World
Hello {$World} - Hello {$World}
evalmight also help you, but I cannot verify that.eval!