html - What does a \" do in php? -
this question has answer here:
- reference — symbol mean in php? 15 answers
i new php , html, , came across code has \" select name defined.
<select name=\"table\" ... my question is: doing?
thank you.
it's escape character. it's used ensure next character not treated code, part of string.
in case, means " part of string, , doesn't signify end of string within code.
for example, if want put inside of string...
he said "shut up"...
i'd write this...
$str = "he said \"shut up\"..."; the backslash can used special "sequences", insert special characters. example, if want insert newline string, i'd use \n escape sequence. or, if want full crlf, i'd use \r\n insert both carriage return (\r) , line feed (\n) together. there many escape sequences, of described here, in php documentation.
Comments
Post a Comment