How to store formatted text in MySQL table?
问题 [My EDITED New Question] I am taking text input in HTML form as <textarea> . Suppose the user entered the following text: 1. Hello World 2. Hi World 3. Hola My PHP code is inserting into the table as: 1. Hello World\r\n2. Hi World\r\n\r\n3. Hola I am displaying this text into a DIV element by using the below method (assume that $text is retrieved from database): <div><?php echo $text ?></div> The output I am getting is: 1. Hello World 2. Hi World 3. Hola How to get the exact output as user