Welcome Guest, Not a member yet? Register   Sign In
Need regex help to replace links in a string
#4

[eluser]danmontgomery[/eluser]
http://ellislab.com/codeigniter/user-gui...elper.html

Quote:auto_link()

Automatically turns URLs and email addresses contained in a string into links. Example:
$string = auto_link($string);

The second parameter determines whether URLs and emails are converted or just one or the other. Default behavior is both if the parameter is not specified. Email links are encoded as safe_mailto() as shown above.

Converts only URLs:
$string = auto_link($string, 'url');

Converts only Email 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);


Messages In This Thread
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:32 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:45 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:47 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 11:55 AM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 12:01 PM
Need regex help to replace links in a string - by El Forum - 01-11-2010, 02:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB