I'm building a very basic CMS for a specific project that contains numerous functions such as get_menu(), get_title(), get_recent(), etc. However, I want to be able to store templates, which would be echoed during page load, that contain said functions in the MySQL database.
Doing a str_replace for each possible function would be a pita and I realize that using eval() is at times dangerous. Is there a better, more efficient way to go about doing this? I'm pretty sure it can be done as this is how templates are set up in Textpattern.