auto_link($str, $type = 'both', $popup = FALSE)
Parameters: |
|
---|---|
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 parameter is not specified. E-mail links are encoded as safe_mailto()
as shown above.
Converts only URLs:
$string = auto_link($string, 'url');
Converts only e-mail addresses:
$string = auto_link($string, 'email');
The third parameter determines whether links are shown in a new window. The value can be TRUE or FALSE (boolean):
$string = auto_link($string, 'both', TRUE);
Please login to continue.