How to show this text, in textarea, to have a newline format

Source: Internet
Author: User
How to display this text, in textarea, to have a newline format






$val = "1234
Document (\ ' 5678\ ') ";
Echo ';
?>

------Optimal Solution--------------------
$val = " 1234Document (\ ' 5678\ ') ";
Isn't it a string above? Why don't you write this?
$val = ' 1234Document ("5678") ';
------Other Solutions--------------------
$val = " 1234
Document (\ ' 5678\ ') ";

There's a BR ~ ~ ~ ~
------Other Solutions--------------------
In short, it's

1234
Document (' 5678 ')

So a word, to be shown in the textarea, then I add escape, but, the error is mainly double quotation mark problem

.. Value= "\" \ ""

Escape single Quotes No problem, escape double quotes and outer double quote conflicts
------Other Solutions--------------------
Citation:
$val = " 1234document (\ ' 5678\ ')";
Isn't it a string above? Why don't you write this?
$val = ' 1234document ("5678") ';


It's hard to be here, can't change

1234
Document (' 5678 ')

Output as-is in textarea, and cannot be manifested.

Just like you entered this paragraph in the Textrea, the less than is less than the number, single quotation marks are single quotes, double quotation marks are double quotes,

How do you do that??
------Other Solutions--------------------


How to use JavaScript to

1234
Document (' 5678 ')

Output in textarea???

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.