Although I will be this way, but has not been how to understand the principle of writing, in PHP because of the special meaning of single and double quotation marks, so I see a lot of quotes will have a nod, especially this kind of several quotation marks nested in the same way not how to understand, the friend to help explain the meaning of writing so, I just know that in IDE tools this variable will change color ....
Reply content:
Although I will be this way, but has not been how to understand the principle of writing, in PHP because of the special meaning of single and double quotation marks, so I see a lot of quotes will have a nod, especially this kind of several quotation marks nested in the same way not how to understand, the friend to help explain the meaning of writing so, I just know that in IDE tools this variable will change color ....
In PHP, the single quotation marks will be the default string, the double quotation mark Zend Engine will determine whether there will be variables exist, if there are variables, will parse the variable.
So here, actually does not need to use the connector to write, can write directly,
echo "连接符";
The usage upstairs is correct, I will explain your usage. In PHP "." is used to connect strings, so you can put the "." Before and after splitting into two parts, so that your code is actually "string" + variable + "string", where the double quotation marks are used as wrapping strings. Next is the use of the A tag, and the URL after the property href= should be quoted as you should know, because double quotation marks can no longer appear in double quotes, so the use of single quotation marks instead. Don't you know I'm clear?
PHP distinguishes between single and double quotation marks, double quotes can have single quotation marks, and single quotes can also have double quotation marks.
When parsing, strings using single quotes do not automatically replace variables inside, and strings that use double quotes replace variables and function calls inside, so double quotes are a bit slower than single quotes.
Official document (String): Http://php.net/manual/zh/language.types.string.php#language.types.string.syntax.single