I'm building a templating system and I'm having trouble displaying variable values from a mediumtext field.
Example:
$data = "test";
Now in the mediumtext field, I have the following: This is just a <{$data}>.
What outputs to the browser is of course: This is just a <{$data}>.
What I'd like output is: This is just a test.
When I ereg_replace <{ and }>, all I get is: This is just a $data.
How can I get the value of $data output rather than it just outputting as-is to the browser?
Any suggestions on my current thought process would be great, if there is a better way to do this, of course that would be great too. I don't mind researching if someone can just point me in the right direction. Thanks!