I retrieve the value of the product description stored in the database from admin via textarea after the form is submitted. When I select a description from the database, I get $description = $row['description'];it and I would like the echo $ description on the main page to look like this: echo nl2br($description);but I see characters "\r\n"instead of creating new lines. From what I found here and on the web, your string should be used between double quotes, for example:
echo nl2br("Hello, \r\n This is the description");
Now the value $descriptionfrom the database is actually "Hello, \r\n This is the description", but in my script I have to use it like this:
echo nl2br($description);
What br does not do, it infers \r\n. So what can I do, I cannot use double quotes here, in my experience.
source
share