I entered some paragraph with text Alignment and saved that in DB. After got the text from DB and display in one
\n \b \r
There are several ways to do this.
You can use PHP preg_replace function to prettify your text. Let's say you stored your text in some variable called $var. You can use following to replace all \n with HTML
$var = "Your text goes here...."; $var = preg_replace( '/[\n\r]+/',"<br>", $var );
Using HTML pre Tags
You can simply use HTML pre tag to add some quick formatting to your text. Just bind your text within