searching text & transforming to link

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
taldos
Forum Commoner
Posts: 39
Joined: Mon Aug 23, 2004 8:47 am
Location: Philadelphia

searching text & transforming to link

Post by taldos »

I am sure there is a function that exists to do this, but as I am new to php just wondering if someone could point me in the right direction.

What I am trying to do is allow users to enter a link into a text field, such as "http://www.vicouncil.org". Prior to saving the text to the database I want to search through the text and insert the hyperlink tags. This will allow me me to display the text as a hyperlink when i pull it from a database rather than as regular text.

I hope my question was clear. all help appreciated.

Best,

Edward M.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

it would be best to add the tags when pulling the information from the database instead of before entering it it.

do a search on this forum for bbcode + link, it has been discussed many times before.

Mark
Post Reply