I have a question about a well known problem: the messages of my users contain hyperlinks to other area's of my website. I fetch data from the database to show the last message a user has posted on his profile. This works, but I can't see the hyperlinks. I just see them as plain text. How can I make these things hyperlinks as they should be?
I use this for example:
$lastpost = execute_scalar("SELECT message FROM messages where messages.user='$who' Order by date desc");
@Prasath Albert here you go:
$message = preg_replace("'\look here: (.*)\)'Ui","(look here: <a href=\"haha.php?&q=\\1\">\\1</a>)",$message);