Jump to content

create links


TobesC

Recommended Posts

inside the text area you can't... unless you use some javascript or something like that. I know I have seen some folks do it in a wysiwyg editor. But for the most part text boxes are only going to display text. You can make it so that a person adds a

[a][/a] 

block around the code they want to be a link and your script replaces those with the proper

<a > and </a>

tags.

 

Otherwise you could parse the whole text area and use a bit of regex to find the text that starts with http:// and ends with a blank space, then set the results in a var and make the var the link.

 

 

I hope this answers your question or at least helps point ya in the right direction. Lemme know if it does not and I will try to help better.

 

nate

Link to comment
https://forums.phpfreaks.com/topic/85222-create-links/#findComment-434771
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.