I am using an html editor and when displaying the after it has been submited I use preg_replace to get the urls showing up correctly.
Currently this is not working if I have multiple urls in the same paragraph. If there are multiple urls then the url contains all text between the two urls for example
this is the first one url1 and this is the text between url2 and this is the end of the paragraph
this would show up as:
this is the first one URL and this is the end of the paragraph.
this is how i am using the function
Code: Select all
$page["content_parsed"] = preg_replace("/\[url=(.*)\](.*)\[\/url\]/i", "<a href=\"\\1\">\\2</a>", $page["content_parsed"]);