You can replace portions of a string with different text.
Three useful PHP functions for replacing text:
Function | Description |
---|---|
str_replace() | replaces all occurrences of the search text within the target string |
substr_replace() | replaces a specified portion of the target string with another string |
strtr() | replaces certain characters in the target string with other characters |