If I have a textfile of words, each word on one line:
dog
cat
viagra
for instance, and I get them into an array, how then can I replace those
words in a string with something else:
"The quick dog took viagra and the lazy cat was unhappy."
I want it to say:
"The quick ### took ### and the lazy ### was unhappy."
I've been banging my head against this, with foreach (both forms) and
rtrim, and preg_replace, and str_replace, and I can't get it to replace.
I don't need to see code, just a general "algorithm" would be useful.
Thanks.
--
Looks like more of Texas to me.
.... Arizona, where the nights are warm and the roads are straight.