Skip to main content
Participant
April 7, 2010
Question

php echo link

  • April 7, 2010
  • 1 reply
  • 693 views

Heya,

Im echoing a piece of text from a recordset which contains a link to a website..

e.g   Check out this link http://www.google.com

Is there a way I can code in PHP so that it detects the http:// link and transforms it into a clickable href link

David

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

David_Powers
Inspiring
April 7, 2010

Yes, you can do it with preg_replace().The difficulty lies in creating a regular expression that finds links accurately.