Home > Article > Backend Development > How to solve the problem that the n newline character in the php string is invalid and cannot be broken?
There is the following php code:
The newline character n in the program will be output directly, and the newline cannot be changed correctly. Solution Method: Change single quotes to double quotes:
In fact, it is the difference between double quotes and single quotes in php, a simple summary Variables in double quotes can be parsed, and single quotes are absolute strings. Example, three ways to remove line breaks in PHP
|