For questions about how to use single quotes and double quotes in php, see how to correctly represent strings in PHP: abcdefghijklmnopqrst and abcdefghijklmnopqrst ------ solution ------------------ pairing. you can give an example .. ------ Solution: mixed use of single quotes and double quotes in php
Ask the hero how to correctly represent the string in PHP: "abc 'defg" hijklmn "opq 'rst" and the string 'ABC "defg 'hijklmn 'opq" rst'
------ Solution --------------------
Just do pairing. you can give an example ..
------ Solution --------------------
$ X = "old test ";
$ Str1 = "this is an $ X ";
Echo $ str1;
$ Str2 = 'This is an $ X ';
Echo $ str2;
------ Solution --------------------
1. enclose strings in quotation marks
2. the single quotation marks in the string enclosed by single quotation marks must be escaped.
3. the double quotation marks in the string enclosed by double quotation marks must be escaped.
------ Solution --------------------
$ Str = '"abc \ 'defg" hijklmn "opq \ 'rst "';
$ Str2 = '\ 'ABC "defg \ 'hijklmn \ 'opq" rst \'';
Echo $ str. ":". $ str2;