how to replace a word with link in a text
Posted: Wed Aug 03, 2005 1:03 pm
hello guys,
i have a problem like this:
i have one paragraph text, now i want to replace a specific word from that paragraph with link , ie i want to add a link to that word.
the problem is simple, if we consider paragraph with normal text, and can be solved with str_replace, but if text contains HTML part, then i am not able to do it with str_replace,
please anyone knows equivalent regex expression which can replace text with link. i just want to replace normal text that does not contain any existing link.
i have a problem like this:
i have one paragraph text, now i want to replace a specific word from that paragraph with link , ie i want to add a link to that word.
the problem is simple, if we consider paragraph with normal text, and can be solved with str_replace, but if text contains HTML part, then i am not able to do it with str_replace,
please anyone knows equivalent regex expression which can replace text with link. i just want to replace normal text that does not contain any existing link.