How to format plain text in php?
I extracted some text from an Excel file and stored it in a DB. After that, I fetch this text from the DB and display it on a page.
Below is how the problem looks like on the page:
And this is a screenshot of how it appears in the source code:
How can I format this paragraph to show in page correctly ?
Just try this
<div name="description" ....> <pre> ..... here your content ..... </pre> </div>
if not work let me know
Take a look at HTML Purifier. Pretty good at cleaning up dirty input. http://htmlpurifier.org/