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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/241971-detecting-url/#findComment-1242646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.