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 ?

Answers


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/


Need Your Help

Why updated structure variable not printing

c

This is my code in which if student marks is greater than 85,scholarship status will be changed to sanctioned, but after updating it is not printing

Is it possible to group/isolate tasks in ThreadPool when using WaitHandle.WaitAll?

.net multithreading thread-safety threadpool

The scenario I am facing is as below. Because ThreadPool is 1 instance per process so my question is that would method 1 cancel tasks queued by method 2 after 3 seconds?