In this particular case, you can replace \n
on your string with <br>
tags.
From PHP manual on str_replace:
$str = "Line 1\nLine 2\rLine 3\r\nLine 4\n"; // THIS IS YOUR DB VALUE!
$order = array("\r\n", "\n", "\r");
$replace = '<br />';
// Processes \r\n's first so they aren't converted twice.
$newstr = str_replace($order, $replace, $str);
You are viewing it like that because \n
(new lines) don't have the new line effect on HTML. They just show one next to the other. To force a line break you need to use a <br/>
tag or a table, or a unordered line...