Replace in a String

Knowledge Base Entry: #57
^Top
<< Back
Mobile-Menu










Replace in a String
Category: PHP/Snippets
Author: Bugfish
Created at: 2020-11-07 16:02:41
Modified at: 2025-09-20 03:58:12
Directs Hits: 711
Example of replacing a sign in a string (works with more than one sign)
 
$newstring = str_replace("TEXT", "NEW TEXT", $initialstring);
Caution: I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.
This Website is using Session Cookies for Site Functionality.