Dec 3, 2009
I am having a little problem. I have this function currently, itsort of work, but doesnt do the entire job I need.
View 14 Replies
Code: [Select]function format_html($content)
$content = "<p>" . str_replace("
", "<br/>", $content) . "";
$content = "" . str_replace("<br/><br/>", "</p><p>", $content) . "";
Basically, I am calling for some text from a database, adding in <p> tags and checking for url, where some thing like www.something.com has been added and creating a clickable link from it. This works, however only once, if another link is included anywhere with the text, bith links get jumbled up. I also want to be able to include into the function the ability to check for email addresses, and include the mailto tag into that.