Jump to content

How to replace \r\n \n or \r with </p><p>


horseatingweeds

Recommended Posts

I'm taking some text from a textarea input and putting it into an html email. I'd like to translate any line breaks into new paragraphs. Anyone know a good way to do this?

 

I'm thinking str_replace() but there is the problem of different OP making different line break characters.

Link to comment
https://forums.phpfreaks.com/topic/63136-how-to-replace-rn-n-or-r-with/
Share on other sites

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.