I have a string which I want to search through for a given expression. If I find this expression I want to insert a new string behind it. How do I do this?
not sure if there is a reason you want to actually scan to see if the string exists in the firstplace?
ok I've altered my code a bit so it works with str_replace. Only problem now is that str_replace replaces all occurrences of the search string with the replacement string. Is there a way to get it to only replace the first occurence of the search string?