This article mainly describes the PHP string in the invalid line break, can not wrap the solution, in fact, PHP is the double quotes and single quotes use problems, the need for friends can refer to the following
For example, the following code: Code is as follows: <?php echo ' Hellon '; echo ' World ';?> the newline character N in the program is directly output, the line cannot be wrapped correctly, the solution is to change the single quotation mark to double quotation mark: Code is as follows: <?php echo "Hellon"; echo "World";?> that's it! In fact, PHP's double quotes and single quotes, the difference between the simple generalization of double quotes in the variable can be resolved, single quotes is an absolute string. : PHP To remove the line of three methods code code as follows: <?php //php different system of the new line //No The implementation of line wrapping between the systems is different //linux with UNIX/n //MAC with/R //window to reflect Unlike Linux, it's/r/n /So it's not the same on different platforms //php has three ways to resolve 1. Use Str_replace to replace line $STR = str_replace (Array ("/r/n", "/R", "N"), "", $str); //2, using regular replacements $STR = preg_replace ('//s*/', ', ', $str); //3, using PHP defined variables (recommended) $STR = Str_replace (Php_eol, ', $str); ?>