mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
14 lines
319 B
Markdown
14 lines
319 B
Markdown
|
Modifier replace
|
||
|
================
|
||
|
|
||
|
Replace all occurrences of the search string with the replacement string
|
||
|
|
||
|
```
|
||
|
{$string|replace:$search:$replace}
|
||
|
```
|
||
|
|
||
|
This modifier returns a string with all occurrences of `$search` in subject replaced with the given `$replace` value.
|
||
|
|
||
|
```smarty
|
||
|
{$fruits|replace:"pear":"orange"}
|
||
|
```
|