I am creating a CMS application. I am trying to save the text in the DB(MySQL). While trying to retrieve the value, I see that the line breaks are not reflecting in my HTML.
How can i retrieve the text with the respective formatting.
I have already tried using htmlentities()
, nl2br()
in php, but that doesn't work.
Eg:
Input text:
Hello World.
This is John
value that I see after being retrieved from DB:
Hello World. This is John.