Code A:
Copy CodeThe code is as follows:
Echo ' Hello
';
Echo ' world! ';
?>
Output
Helllo
world!
Code B:
Copy CodeThe code is as follows:
Echo ' hello\n ';//unix system using \n;windows system \ r \ n
Echo ' world! ';
?>
Output
helloworld!
Analysis: The browser does not recognize \ \ r \ n, these two line breaks are text line breaks, text files are valid; Viewing HTML source code in a Web page can find that code B successfully implements a newline
Summary: If you need to output the results to a browser or print to a display, use the
If you are only wrapping in source code, use \ n or \ r \ n
http://www.bkjia.com/PHPjc/326495.html www.bkjia.com true http://www.bkjia.com/PHPjc/326495.html techarticle code A: Copy the code as follows:? PHP echo ' hello/br '; Echo ' world! ';? Output:helllo world! Code B: Copy code code as follows:? PHP echo ' hello\n ';//unix system Use \n;window ...