The difference between double quotes and single quotes in php "" fields in double quotes are interpreted by the compiler and then output as HTML code. ''Is output directly without being interpreted in single quotes. The parsing time of single quotes is faster than that of double quotes. single quotes support \ escape characters, and double quotes support more escape characters. $ hello = 3; echo "hellois $ hello" php double quotes and single quotes are different.
"" Fields in double quotation marks are interpreted by the compiler and then output as HTML code.
''Is output directly without being interpreted in single quotes.
The time for parsing single quotes is faster than that of double quotes.
Single quotation marks support \ escape characters, and double quotation marks support more escape characters
$ Hello = 3; echo "hello is $ hello"; // print the result: hello is 3 echo 'hello is $ hello'; // print the result: hello is $ helloecho "hello is $ hello \ n"; // print the result: hello is 2 (line feed at the same time) echo 'hello is $ hello \ n'; // print the result: hello is $ hello \ n
?
?