Forum Moderators: coopster
My users can currently input text to a database with a title for each piece of text.
I'd like them to be able to put <<double lt and double gt>> around words in their text that are titles for other pieces of text.
When the text is retrieved from the database, any characters within << >> will form a get statement appended to a url to make the link to a page showing the associated text.
Sorry if its not clear, I've re-drafted this post a few times. Any help appreciated, thanks.
$pattern = "/<<(.*)>>/is";
$text = preg_replace($pattern, "<a href=\"somescript.php?keyword=$1\">$1</a>", $text);