How to make links clickable in block of text using php
We will be building a function that can read urls and make them clickable and open in a new tab with the option of adding a class to style your urls. This can be used even with text returning from the database.
'<a class="'.$class.'" href="//$3" target="'.$target.'">$1$3</a>',
$tutorial = make_links_clickable($tutorial, $class='', $target='_blank');
This can be use with ftp, http, ftps and https schemes.
Download the source code and check it out!