I am trying to display a block of text which contains whitespace, new line etc. which is retrieved from the MySQL database. The data is saved in the DB with newline. but when it is displayed in the php page new lines are not shown. All text comes in one single line. Please help. Thanks in advance.
The code which displays the block of text from db:
<?php if (isset($row['Description'])) {?>
<p>Description :</p> <?=$row['Description'] ?>
<?php } ?>
If Description is saved in DB as :
"First line text
Second line text
Third line text."
It is displayed in the web page as:
"First line text Second line text Third line text."
I want the result as :
"First line text
Second line text
Third line text."
block?](http://stackoverflow.com/questions/1011641/how-can-i-use-css-to-preserve-line-breaks-in-an-html-code-block)
– hakre Dec 28 '12 at 18:04