Hi All, I am designing a News board and wish to convert any text beginning with 'http://' into a hyperlink, when displayed on the page. I have converted all the HTML tags (htmlspecialchars) before saving the data.
I can do the initial bit fine (adding the <a href=...>) before the start of the link, but I am having great difficulty in adding the closing tag. The main problems I am having are: i) If there is more than one link. ii) If the User has entered the link with the correct HTML in the first place, I just want to convert it back into HTML (Obviously they would need to have entered the 'http://' part of it. iii) If there is a line break at the end of the link, opposed to a space. I am presuming that there are no spaces in the link for this one. I have been going round in circles for quite a few hours now, but just don't seem to be progressing, so any help anyone can offer will be very much appreciated. Regards Alexis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php