str_replace() (PHP) - str_replace()-Функция str_replace() заменяет в строке одни символы на другие.
<!DOCTYPE html>
<html>
<body>
<p>Search the string "Hello World!", find the value "world" and replace it with "Peter":</p>
<?php
echo str_replace("world","Peter","Hello world!");
?>
</body>
</html>
echo:
Search the string "Hello World!", find the value "world" and replace it with "Peter":
Hello Peter!