1.0 1.1 1.2 1.3

Replaces the search string by the replace string

replace(string $value, mixed $search, mixed $replace)
  • value: the string to search into
  • search: the string to search for or an array of strings
  • replace: the string to use as a replacement or an array of strings (matching the search array)


Example #1

{replace "abc" "b" "B"} or {"abc"|replace:array(a,c):array(A,C)}

The above example will output:

aBc or AbC