url question.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • siliconmike

    url question.

    I'm writing a guest book where users can post comments.

    When the text data is displayed on html page, I'd like to convert the
    url's to clickable links, using some smart technique.

    eg.

    Hi I found this link! http://news.bbc.co.uk

    (the link should be clickable)

    or anything prefixed with www. should be clickable

    Is there any built in php function?

    Thanks
    Mike

  • NC

    #2
    Re: url question.

    siliconmike wrote:[color=blue]
    >
    > When the text data is displayed on html page, I'd like
    > to convert the url's to clickable links, using some smart
    > technique.
    >
    > eg.
    >
    > Hi I found this link! http://news.bbc.co.uk
    >
    > (the link should be clickable)
    >
    > or anything prefixed with www. should be clickable
    >
    > Is there any built in php function?[/color]

    No. You should use regular expressions.

    Cheers,
    NC

    Comment

    Working...