Yea, I agree with you about intensity. One other "possible" idea, though a little redundant, would work:
Create another column or table (your preference) that holds the converted data (re: the description with urls included). If the field's there, then display it. If not, then run the function and insert the results... basically, let the user parse the data for you.
Gudmundur Helgason wrote:
Yes, is is precicely what was gonna do 🙂 But I am worried it might be too CPU and time-intensive to do many descriptions.
But I can test this I guess.
The main goal was to own a single file of "approved" links and keywords.
I just am not sure the str_replace() loop (perhaps 1-300 cycles if I replace one word at a time) is the most efficient way to do this.
Gudmundur Helgason
Al McGrath wrote:
One idea would be to create a function that parses through the description when you actually display it, and do your replacement then. That way, you don't have to change the actual data in the database (which might not be good, especially if the locations change, the data is used in other way, etc)