Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$a = 'this is a link http://somerandomsite.com, check it out!'; $a = preg_replace("/\b((?:http\:\/\/)|(?:www\.))([^ ,]+)/", "<a href=\"$1$2\">$1$2</a>", $a); echo $a;