below is a simple example code snippet which shows you how to do it: In the above example code, you can notice that we have used str_replace function to replace the text “AGE” into “19”. The first is for selecting the search term or needle in the target string. In this example, an array of two elements is created. Incoming search terms: cara membalik urutan September 5th, 2012 - Posted by Steve Marks to PHP, Web Development. Press the button to execute the str_replace function of PHP. Therefore member functions like replace() returns a new string. I have already shown in one of my posts how to replace a character of a string using the PHP str_replace() function. In str_replace function, an HTML tag is added with background color in