Method 1 of double quotation marks output
$ Str = 'I want to output double quotation marks "'; echo $ str; // The result is: I want to output double quotation marks"
Method 2
$ Str = "output double quotation marks" "; echo $ str; // The result is: output double quotation marks"
Method 1 of single quotes output
$ Str = "output single quotes '"; echo $ str; // The result is: output single quotes ′
Method 2
$ Str = 'output single quotes ''; echo $ str; // The result is: output single quotes ′
In addition, it should be noted that the variables in the literal in the middle of the single quotes will not be executed, and variables in the middle of the double quotes can be executed. Therefore, the efficiency of output characters in single quotes is higher than that in double quotes without variables. many. For special characters, you can use the transfer character "".