Hi.
The title says it all:
I am looking for a solution (probably preg_replace-based)
to replace text parts with links.
My first trial:
$pattern = "$titel";
$replacement = '<a href="/glossar/'.urlencode($titel).'" class="glossarlink">'.$titel.'</a>';
$html = eregi_replace($pattern, $replacement, $html);
The problem:
Headlines (<h1></h1) and part of links are also replaced.
Is there a solution to prevent this?
Thanks alot for any hint!
Fox