How does PHP output line breaks? PHP outputs the html source code, because many of them do not have line breaks when viewing the source code! Source code line feed! How to output line breaks? The server is win! Also ask how to output in linux, windows \ r \ n \ r is the carriage return character linux \ n, discuss windows \ r \ n \ r is the carriage return character linux \ n, how does ech PHP output line breaks?
PHP outputs the html source code, because many of them do not have line breaks when viewing the source code!
Source code line feed!
How to output line breaks?
The server is win! Also ask how to output in linux
------ Solution --------------------
Windows \ r \ n \ r is the carriage return.
Linux \ n
------ Solution --------------------
Discussion
Windows \ r \ n \ r is the carriage return.
Linux \ n
------ Solution --------------------
Echo"
";
Echo"
";
Echo "\ n ";
------ Solution --------------------
View the html source code. use
This is also good.
------ Solution --------------------
Echo "\ n" is used for line feed when HTML code is output"
Echo"
"
------ Solution --------------------
\ N.
\ R \ n in Windows
\ N in Linux/UNIX
\ R for Mac
------ Solution --------------------
PHP code
Echo "\ n"
------ Solution --------------------
Process the data you want to output before outputting it.
Function strip_textarea ($ string)
{
Return nl2br (str_replace ('','', htmlspecialchars ($ string, ENT_QUOTES )));
}
Or the function opposite to nl2br. you can check the manual.