Posted By

fackz on 04/23/13


url mail link into to

Versions (?)

Who likes this?

3 people have marked this snippet as a favorite


Function to Auto Convert URL into Clickable Hyperlink (Anchor Tag)

 / Published in: PHP


In wordpress, if you want to auto convert all URLs in your string into clickable hyperlinks, you can actually do it using the built-in function make_clickable().

If you need to do that outside of wordpress, you can use the same function. Example: $string = 'I have some texts here and also links such as , and [email protected] They are ready to be replaced.';

echo make_clickable($string);

Report this snippet  

You need to login to post a comment.