I have been trying to figure out how to replace an absolute string.
Take for example:
"The man in there was on the theme for the"
Lets say I want to only replace the word "the". But when I try to use preg_replace I seem to catch there and theme because it has the in it. So how do I get and absolute string?
$message = string of data to parse, in this case using the example "The man in there was on the theme for the"
$word = is a single string which is the word to look for, using the example "the"
$replace = A string of * = to the length of the word, using the example "***"
Same problem as before:
"The man in ***re was on *** ***me for ***"
It misses the first the, and replaces words with the in them. Thats why I was trying preg_replace.
I played with it some more and I found a small bug I had which got me closer. But I am missing the first the.
"The man in there was on *** theme for ***"