Jump to content

this is possible..


Rifts

Recommended Posts

The formatting IS being retained when you save to the DB - line breaks and all. The problem is that the browser does not process linebreaks when rendering code - not without specific tags such as <PRE>. But, you don't want to use <PRE> for this anyway.

 

Just save the input to the database as normal (don't add <BR> tags). Then on the page where you display the output use nl2br() to output the text. That function will automatically convert nel lines to <BR /> tags.

Link to comment
https://forums.phpfreaks.com/topic/217463-this-is-possible/#findComment-1129067
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.