Call smarty plugin function directly from PHP

Therefore, I can use the Smarty plugin html_optionsin a template like this:

{html_options options=$arr }

But what I want to do is call the function behind this plugin ( smarty_function_html_options) directly from PHP.

I'm sure this should be possible, does anyone have any ideas on how to achieve this?

+3
source share
1 answer

First, find the PHP file that contains html_optionsthe Smarty installation. Then enable this function from your code. Finally, call the appropriate method in your PHP code.

"" Smarty , , , . . Smarty , PHP, .

, , "" : , . , , HTML, .

+3

Source: https://habr.com/ru/post/1754767/


All Articles