Ec (2); double quotation marks will enable the program to check whether a variable is used for variables. Only double quotation marks can be compiled to replace them with variable values. & nbsp; there are also double quotation marks for n and so on.
The following small series for you to share an article based on PHP double quotation marks to access the array elements of the solution to the error, has a good reference value, I hope to be helpful to everyone. Let's take a look at it with a little
In the PHP page, if you do not want the following conditions:
Single quotes are escaped as '
The double quotation marks are escaped as "
You can then set the following to prevent:
Method One: Set in php.ini: MAGIC_QUOTES_GPC = Off
Method
$ Hello = "this is helloworld ";$ Test = "{$ hello }";$ Test = '{$ hello }';Pstutorial: it is obvious that the double quotation marks will be iterated out. & nbsp; single quotation marks will remain unchanged.In fact, when I was writing SQL
Action
Long num = 10L;String jsonstr = "{\" long\ ":" + num + "}";Outputjson (JSONSTR);The JSONSTR string is output to the foreground, which is parsed by the foreground in JSON format.
If it's a string,
String result = "XY";
String jsonstr = "{
In js, single quotes and double quotation marks are the same. We try to use single quotes whenever we use them. Only when we encounter nesting will we use two quotation marks at the same time, interested friends can understand the executable Syntax:
Directly enclosed in single quotes in php as strings for execution
The double quotation marks are enclosed in the output format after being executed by the compiler.
Instance
PHP code$ Test1 = "aaa ";$ Test2 = "bbb ";Echo '$ test1'; // single
Php Basics-differences between double quotation marks and single quotation marks in php's previous cognition, I think there is no difference between single quotation marks and double quotation marks. if single quotation marks are used outside,
In PHP, you can use single or double quotation marks to define a string. In normal use, there is no difference between the two symbol-defined strings. Today, I wrote several lines of code to illustrate the example of "assignment by address". In this
When the angel used Oracle, he found that the use of single and double quotation marks was different. Then he checked some information online and made some summary:
Double quotation marks: when an object is created, the object name and field name
Contains single quotes () or double quotation marks (& quot;), which may cause JavaScript errors. This is generally solved by using or & quot;. When JavaScript is used to display messages or transmit character data, it is often encountered that the
If you do not want the following to occur in the PHP page:
Single quotes are escaped as \ '
Double quotation marks are escaped as \ "
You can then set the following to prevent:
Method One: Set in php.ini: MAGIC_QUOTES_GPC = Off
Method Two: $str
One, what is the escape character
An escape character is a special type of Word constants, preceded by a backslash "/" followed by one or more characters. Have a specific meaning, different from the original meaning of the character, it is called
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.