I am retrieving a product description value stored in database from admin through textarea upon form submit. When I select the description from database I get $description = $row['description'];
and I would like to echo $description on main page like this: echo nl2br($description);
but I see "
"
characters instead of making new rows. From what I've found here and on the net, your string must be used between double quotes, like this:
echo nl2br("Hello,
This is the description");
Now, the value of $description
from database is in fact "Hello,
This is the description"
but in my script I have to use it like this:
echo nl2br($description);
Which does not make br's, it is outputing
instead. So, what can I do, I can't use double quotes here, from my experience.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…