Forum Moderators: coopster
Now in the forums of this site I want to hotlink the wordX to the pages in the wiki. It would be enough if it only worked for the first Word, as I assumeit would be rather "expensive" checking each and filtering out "fill words" like "in" "at" etc.
I am wondering what would be the best way.
Options I thought of:
- Make a select such, that I have an array with the word-to-be-replaced, and a link to the page. Then use str_replace (which can be used with arrays, right?). I am wondering if I can get the format I want from mySQL...otherwise I guess I'll use the preg-functions
- Select hte titels, then do a loop for matching and build the link and replace the word when I find a match.
Do you have another/better idea? Would it be wise to add another table with just the right format to do the replacing...?