Can someone please read through this short question and give me an answer? 🙂
well, here goes:
What I want, is to make links out of text usin PHP. Let's say I have a row in a MySQL table which contains nothing but simple text.. but in this text there are also some URLs written, either by www.url.com or by http://www.url.com ..
Now, when I echo that text, I would like PHP to automaticly transform these URLs into links, so that it would be made a href out of the URLs.
Do you follow me now?
A short example:
table.text contains:
"Hi, my name is Morten and my homepage is to be located at www.my-homepage.com .. Please visit it and sign the guestbook!"
What I now want this to look like, is something like this:
"Hi, my name is Morten and my homepage is to be located at <a href="www.my-homepage.com">www.my-homepage.com</a>.. Please visit it and sign the guestbook!"
I was told I could use regular expressions to solve this problem, but I still haven't found a way to solve it, so any help would be appreciated..