swamp Posted September 3, 2008 Share Posted September 3, 2008 Hi, I have a page that reads from a mysql database, how on output can I make all links (in the format of www.website.com) turn into <a href="http://www.website.com">www.website.com</a> and all email links (in the format of [email protected]) turn into <a href="mailto:[email protected]">[email protected]</a> Link to comment https://forums.phpfreaks.com/topic/122550-automatically-generate-href-or-mailto-from-links/ Share on other sites More sharing options...
cooldude832 Posted September 3, 2008 Share Posted September 3, 2008 use a regex pattern to find patterns that are bblha@blah(dot)blah the blahs can be the pattern of match any thing and then u a replacement system to replace it with the tags added in there are google things out there on this. Link to comment https://forums.phpfreaks.com/topic/122550-automatically-generate-href-or-mailto-from-links/#findComment-632736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.