Jaynesh Posted July 14, 2011 Share Posted July 14, 2011 Hello How do I detect a url from a bunch of text? I don't want to turn the url into a link, I want to echo the link on its own. For e.g $text = 'hello this is my website www.google.com' I would like to detect the url in the above text, and echo just the url. Link to comment https://forums.phpfreaks.com/topic/241971-detecting-url/ Share on other sites More sharing options...
Lyleyboy Posted July 14, 2011 Share Posted July 14, 2011 Read about regular expressions. Link to comment https://forums.phpfreaks.com/topic/241971-detecting-url/#findComment-1242646 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.