Jump to content

How to convert the link to Href link from text description


palash4003

Recommended Posts

Hi Support,

 

I have a form, where it collects user description input. I can collect the inputs and store it with newline. The issue is - how to collect the http link to actual hyperlink ref during display.  The following is my code:

 

<textarea name="description" cols="50" rows="10" id="description"><?php echo str_replace("<br>", "\n", $description);?></textarea></td>

 

For example, User input:

 

Hi, Check it out - http://www.google.com/

 

I would like to display google link as href so that Viewers can click the link and go to the page. Right now, it is not href and user need to copy the link to new tabs or pages and then it can come.

 

Thanks for your help.

Regards,

Ahsan

 

 

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.