Examples of single quotes and double quotes in PHP. Fields in double quotation marks are interpreted by the compiler and then output as HTML code. The single quotes are output directly without explanation. Single quotes and double quotes have their own purposes. "" 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.
Single quotes and double quotes have their own purposes.
The content of single quotes is not parsed, which is more efficient.
The following code is used:
$ Url = 'http: // www.bkjia.com ';
// Single quotation mark output
$ Output = '$ url ';
Echo 'single quotes output: '. $ output .'
';
// Double quotation mark output
$ Output = "$ url ";
Echo "double quotation mark output:". $ output;
?>
The output is as follows:
Bytes. ''Is output directly without being interpreted in single quotes. Single quotes and double quotes have their own purposes ....