Retrieve the value in TextArea with the newline preserved
What you need to do is use the
HTML tag before each newline character. HTML doesn't accept newlines. So, for example : CODE echo "this should be
a new line here
and here, too";... But that’s not a multiline string! That is a multiline string literal representing a single-line string. If you want to produce a multiline string (a variable in memory that, upon inspection during execution, contains more than one line of text), you don’t need the trailing backslash but the classic backslash + new line …
I am always looking at peoples code to try to improve me own. I have noticed that a lot of people don't use the tag. I know you can control the width of a paragraph but this doesn't give you consistent line breaks across different browsers.... I like to put a line break between my and button. If I use an image, I can make it, but I like to make it with text. The following would-be code doesn't work correctly, but it will show what I want.
hi, I am tring to display some texts in a textbox using \n to create a new line but it does not work. PHP Code: