I need your help with making a weblink clickable when comments are made on mf website.. The code I have below does not achieve that. It only inserts (Code Not Shown), and the website is not clickable.
Thank you for your help.
$reg = "/(http|https|ftp|ftps|www)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/g";
if(preg_match($reg, $comment, $url,))
{
$comment_body = preg_replace($reg, "<a href = " .$url[0]. "> $url[0] </a> ", $comment);
}
I think the problem is how you specify your href: html likes quotes around sstuff like that. try:
otherwise it will look like:
instead of