Home >Backend Development >PHP Tutorial >How to output double quotes ' and single quotes ' in php
In PHP programming, double quotes " and single quotes ' are expressions of strings and characters. So how do we output it? Let's take a look at a simple example of outputting single and double quotes.
Let's look at the output on the homepage Several methods of double quotes
Method 1.
Copy code The code is as follows:
$str ='I want to output double quotes"';
echo $str;
Copy code The code is as follows:
$str ="Output double quotes"";
echo $str;
//The result outputs double quotes"
Copy code The code is as follows:
$str ="Output single quotes'";
$str1='Output single quotes'';
echo $str;
?> ;
The above introduces the method of outputting double quotes " and single quotes ' in PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.