Forum Moderators: coopster
<p>$message</p>
ie:
<p>This is one paragraph\r\nThis is another paragraph</p>
turns into:
<p>This is one paragraph</p><p>This is another paragraph</p>
However preg_replace("/\r\n/","</p><p>",preg_replace("/\r\n\r\n/","\r\n",$message)) dosn't seem to solve the problem if multiple line breaks take place in a row.
<p>This is one paragraph\r\n\r\n\r\nThis is another paragraph</p>
turns into:
<p>This is one paragraph</p><p></p><p></p><p>This is another paragraph</p>
not like I had hoped:
<p>This is one paragraph</p><p>This is another paragraph</p>
Is there something I'm doing wrong?