Hello !
I want to link a text automatically to some explainations of words. What I do is:
- Take a word or phrase
- Replace it with the link
For example:
Word: "PHPBuilder"
-> "<A HREF="#PHPBuilder">PHPBuilder</A>
The problem:
Now I want to use the word "PHP". If I use str_replace, I get some chaos, since every "PHP" is replaced... even in "PHPBuilder" in the example above.
So what I need would be a function to search and replace, but to exclude text in the middle of tags and tags itself.
Ideas ?
Martin