ProAnswers.org

How can you get the line breaks to work when you retrieve data from MySQL to PHP?

How can you get the line breaks to work when you retrieve data from MySQL to PHP?

In PHP you can restore the line breaks by using the PHP function nl2br().

Example:

Outputs:

hello

hello