JS,There's no difference between single and double quotes, just look at your own habits.However, if you use double quotes in double quotation marks, you need to use backslashes to suppress the parsing of double quotes: alert("ABC\"def\ "ghi"); But
S, single quotes in HTML, double quotes and their escape use (GO) collectionIn the JS in the relevant characters to make judgments or values, or spell HTML to assign value in many cases will use these, but also I have just encountered the problem,
character preceded by backslash, including single quote, double quote, backslash PHP Tutorial code
function D_addslashes ($string, $force = 0) {
if (! $globals [' MAGIC_QUOTES_GPC '] | | $force) {
if (Is_array ($string)) {
foreach ($string as
One, single quotes and double quotes escape in the PHP data stored procedures used more, that is, to store data in the database when you need to pay attention to escape single, double quotes;
Let's say a few PHP functions:
1, addslashes-use
In PHP, single and double quotes are not interoperable, the specific difference is as follows:
The fields inside the double quotes are interpreted by the compiler and then exported as HTML code.
' Single quotes inside without explanation, direct
The difference between single quotation marks and double quotes in PHP
In a programming language, both single and double quotes are important, as is the case in the PHP language. Compared to ASP, PHP quotation marks better use, in ASP, to put the
1. Define String
In PHP, a string can be defined using single quotes or double quotes. However, you must use the same single or double quotes to define the string, such as: ' Hello ' and ' hello ' are illegal string definitions.
When you define
1. Defining Strings
In PHP, the definition of a string can use either single quotation marks or double quotes. However, you must use the same single or double quotation marks to define strings, such as: ' Hello ' and ' hello ' are illegal
First meeting1. Initial knowledgehttp://localhost/Less-1/Prompt for ID, so access http://localhost/Less-1/?id=1Can continue to test the situation of id=2.3.4, etc., will output a different user name and password2. Further informationEach time will
About the difference between single and double quotation marks and efficiency issues. A lot of friends understand is not very clear, always thought that single quotation marks and double quotes in PHP are interoperable, until one day, found that
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.