franhaselden
2/11/2015 - 12:28 PM

Find link, make link, in PHP string.

Find link, make link, in PHP string.

if ((strpos($text,'http') !== false)) {
    	$text = preg_replace('!(http|https)(s)?:\/\/[a-zA-Z0-9.?%=&_/]+!', "<a href=\"\\0\">\\0</a>", $text);

	}