PHP Classes

line breaks nl2br

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  line breaks nl2br  
Subject:line breaks nl2br
Summary:I cannot get my text from the DB to get rid of the \r\n line bre
Messages:4
Author:Richard Lubbe
Date:2010-03-19 16:23:32
Update:2010-03-22 20:50:53
 

  1. line breaks nl2br   Reply   Report abuse  
Picture of Richard Lubbe Richard Lubbe - 2010-03-19 18:45:17
I have code that inserts text from a textarea into a db. When there are line breaks in the text it inserts 'rn' as a line break.

When I read the text out of the db an print it on a page it prints the entire text with not line breaks but only the rn in its place.

I have tried using:

nl2br(htmlspecialchars());
and
nl2br(htmlentities());

It still does the same thing. Am I missing something? Is there a function I am missing?

There are 3 replies in this thread, which are not being displayed.
Browsing this forum thread replies is available only to premium subscribers.


Go to the premium subscriptions page to learn how to become a premium subscriber and have full access to this forum.