Displaying url as a link!

Discussion in 'PHP' started by Justcrapx, Nov 22, 2006.

  1. Justcrapx

    Justcrapx New Member

    Joined:
    Oct 30, 2006
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    I'm working on a message application for my website, its almost finished but i cant find a way to turn urls into clickable links. When someone sends a message including a link, it only shows but i cant click it. I tried the str_replace() functcion but could make it though.
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    You'll need to parse the URI and print it out with an ANCHOR (<a href=''>) tag. Then only will it be clickable.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice