hyperlinks

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Addos
Forum Contributor
Posts: 305
Joined: Mon Jan 17, 2005 4:13 pm

hyperlinks

Post by Addos »

Is there a little PHP script that searches for hyperlinks that are placed in the middle of a text? For example if I type http://www.me.com in an email or even in a Word doc it automatically recognises this as a link. How can I achieve this when I place something similar in my SQL database that when returned to the browser will automatically change it to a link?
Thanks for any help
Brian
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

Regexps will be perfect for this

Search This Link :arrow: http://www.regexlib.com/Search.aspx?k=url
posted a few posts before by Ambush Commander Here viewtopic.php?t=31560&highlight=url+regexp
Last edited by n00b Saibot on Tue Mar 15, 2005 4:11 am, edited 1 time in total.
Addos
Forum Contributor
Posts: 305
Joined: Mon Jan 17, 2005 4:13 pm

Post by Addos »

Thanks very much for this.
Regards
Brian :wink:
Post Reply