Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

php echo link

New Here ,
Apr 07, 2010 Apr 07, 2010

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

TOPICS
Server side applications
694
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2010 Apr 07, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines