Home php Is it possible to execute Smarty code in PHP?

Is it possible to execute Smarty code in PHP?

Author

Date

Category

Hello! Faced with the task. You need to execute Smarty code in the PHP file. Does Smarty have a ready-made solution, or you need to do it in manual


Answer 1, Authority 100%

If you do not need to output a template, and save the result in a variable, you can perform


$ HTML = $ Smarty- & gt; fetch ('template.tpl');

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions