Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Let [url]..[/url] make an url (from the database)

Status
Not open for further replies.

lukelukeluke

Technical User
Joined
Dec 23, 2003
Messages
117
Location
CH
Hi there,

I would like to integrate a function into my little PHP application.
I've searched around and tried some things out with str_replace(), but i didnt find any solution

What i wanted to do was letting the Users write some things into a textarea field, also urls. I want to give them the possibility to write this around the url:
the_url_here
so people will be able to click on it. It should take this:
http://domain.com/

and make this with it:
<a class="xx" href="
any ideas?
thanks alot!
 
added:
It would also be cool if the URLS would be auto generated. Like they are intektips. So if anyone enters an URL with " it makes an <a> automatically....
 
For your second question, if you look at the preg_replace function in the php manual, in the comments section are numerous examples of how to do that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top