Good day. Did not find the answer. Therefore we will set it.
Is it possible to convert a variable to a template style, if so, please give an example. Template side is not interested.
It is necessary that from $name become {name} , and for example from an array
$massiv = array('lala' => 'ляля', 'topolya' => 'тополя'); it became not
$massiv['lala'] but
{massiv['lala']} or better yet
{massiv[lala]} The conclusion is not like this:
<?= 'Привет, '.$name.'!'; ?>
And this:
Привет, {name}!
'lala'and'topolya'are the values, and the keys for them will be0and1, respectively. And why is array initialization being replaced with its first value? And about the simple change of variables - look towardspreg_replace- fremail<?=$massiv['lala']?>, no? Or$object->{$massiv['lala']}->go();? It is not clear what you want in general. - Goncharov AlexanderНужно, чтобы из $name стало {name}- where did it become when outputting HTML to PHP? Or when calling the property of an object? Or in Vasily’s neighbor’s CRM?) I suspect that the first thing is to write this way.Хочу вывод переменных PHP в HTML сделать следущими способами {..способы..} какими средствами кроме сторонних библиотек можно этого добиться?- Goncharov Alexander