I have a question about the line feed code in PHP.

<? php
    echo "Hello World/n";
    echo "Hello World";

When this code is executed in the browser, it will not be displayed with a line break, but when does the line break code mean?
I don't understand the benefits of inserting line breaks into my program ...

  • Answer # 1

    Please check the output HTML ("View page source" in the browser).



    Advantages of inserting into a program

    I think there are things that are easy to find meaning for line breaks, such as CSV and text files other than HTML.
    As far as HTML is concerned, it can be said that it is advantageous to make it easier to check visually, such as "Find missing closing tags" from unformatted HTML.

  • Answer # 2

    It is usually used to improve the readability of HTML output from the browser.




    This is a slash.
    This sort uses a backslash.