DOCUMENTATION

Search »

ft_eval_smarty_string

This is a powerful function that can process any string as a Smarty template, returning the string result. The way it works is quite simple. You pass the string containing the Smarty logic / variables, and a list of placeholders and their replacement values. It does the task of parsing the Smarty string and returning the result. Here's an example. Imagine your language file contained this rule:

Then, you can process that string to replace the $num_settings Smarty variable like so: