Add href inside string

public function str2href($str) {
    $str = preg_replace('/s(w+://)(S+)/', ' <a href="\1\2" target="_blank">\1\2</a>', $str);
}
Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp