auto_link($str, $type = 'both', $popup = FALSE)
Parameters:
$str (string) – Input string
$type (string) – Link type (‘email’, ‘url’ or ‘both’)
$popup (bool) – Whether to create popup links Returns:
Linkified string Return type:
string
Automatically turns URLs and e-mail addresses contained in a string into links. Example:
$string = auto_link($string);
The second parameter determines whether URLs and e-mails are converted or just one or the other. Default behavior is both if the p