Get Smarty



Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty


Get the juciest casino bonuses at this great website

If you are looking for great entertainment online, then we would like to recommend Find the best casino bonus available and much more that makes your casino experience much more enjoyable!


Простой поиск и замена в переменной. Это эквивалент функции PHP str_replace().

Позиция параметра Тип Обязателен По умолчанию Описание
1 string Да n/a Строка текста, которую следует заменить.
2 string Yes n/a Строка текста, на которую следует заменить.

Example 5.15. replace


$smarty->assign('articleTitle', "Child's Stool Great for Use in Garden.");




{$articleTitle|replace:' ':'   '}


Результат обработки:

Child's Stool Great for Use in Garden.
Child's Stool Great for Use in Vineyard.
Child's   Stool   Great   for   Use   in   Garden.


См. также regex_replace и escape.

No comments for this page.