I have a textarea that I need to put a new line into with some dashes above. I have tried nl2br but that just echos the <br> tag. I have also tried to concat the \n but it is ignored.
What this is for is an email like system. When the user replies to an email, I want the old message below with a seperator like a few dashes. I can’t get this to work though.
new message starts here
--------------
old message here
Can someone please give a hand?
Thanks.
Try a return character:
\rAccording to this article, the
\nnewline character should work. What is happening when you are inserting the\ncharacter into the string using double quotes?This works for me:
it properly creates the next line. Check to make sure your source code looks something like that, with n actual line break in the source where you want it to be.