Im working on a personal project, and have run into the following:
I have a template that has various tags, {formated_like_this}. Im creating an array of things that need to be replaced and what it is to be replaced with.
array (
"{this_tag}" => "will become this"
)
Simple things like this work fine when loading from a db.
But i also need to put function names or variable names into the "change to" value.
array (
"{this_tag}" => will_become_this();
"{or_this}" => $with_this;
)
the problem ive found is if you put those into the database thats what gets printed out, ive looked extensivly over variable variables and have a feeling these are what i need to use, unfortunatly im finding the explinations of variable variables very confusing.
i can of course simply create the entire array in a seperate php file, and it will work accordingly, but for my intents id like it in a database.