My Data is reading data saved from the database (Text).
My problem is that it also has these characters: \r\n
How can I stop those characters showing?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Call the nl2br function with the database text in parameter before putting it in your textarea.
The \r\n characters are ASCII “invisible” characters, coding the carriage return and the line feed, or, if you prefer, the fact that there is a new line.
You need to change those ASCII code into HTML code, which is exactly what nl2br does.