I want to write a program with Yii so that users can have their template.
My solution is that every user has a record in a DB to keep a customized template like HTML code and some syntax like Smarty or Twig.
How can I use PHP to get that records and just print it on the screen and my template engine extracts syntax and shows best results? Is that possible or not? How should I do this?
Really you know if you save php codes in database, when you print them into a file, php codes you saved in database don't run. For me the most important thing is that to save template in database whit php commands and then echo them in a file and php code run same usually.
But is is important to use smarty or twig and don't let users add php codes directly.