How can I replace a certain part of my string with another one?
Input string:
\"Hello, my name is Santa\"
How can I change all
Use function preg_replace()
$text ='this is the old word'; echo $text; echo ''; $text = preg_replace('/\bold word\b/', 'NEW WORD', $text); echo $text;