I am trying to use the My problem is that there is some other string in some strings in my array. Here's an example: I have a range of products such as: And I want to convert them all to The result is: I could just change the order in the array, but I have many categories. Is there a function that can help me get desired results? Take a look at , replace Optionally (because I can not fully understand your problem) Sort your list by length, first of all first str_replace () function with an array of strings.
$ product1 = 'COLLIERPEND'; $ Product2 = 'colier';
co .
str_replace (array ("COLLIER", "COLLIERPEND"), 'with', $ product #);
$ product1 = 'coPEND'; $ Product2 = 'cum';
\ bCOLLIER \ b with co Search for In this way you are getting word limits on each side of the search term, so you should not get sub-word problems.
No comments:
Post a Comment