Home > Backend Development > PHP Tutorial > How to use QQ Tornado offline download PHP error using variables in quotation marks

How to use QQ Tornado offline download PHP error using variables in quotation marks

WBOY
Release: 2016-07-29 08:39:50
Original
911 people have browsed it

When you see the error message
syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
this message is about the use of variables.
What happened to me was that an array was used in the statement, causing it to fail. Let's take a look at the failed code;
echo "I am an array, $n['x']";
?>
In this way, the variable can be parsed by instant double quotes, but the writing method of the element group is like this There is no way to parse it. Just modify it to the following!
echo "I am an array, {$n['x']}";
?>
Adding curly brackets {} can make the statement recognize that it is dynamic.

The above introduces how to use qq tornado offline download PHP error in using variables in quotation marks, including how to use qq tornado offline download. I hope it will be helpful to friends who are interested in PHP tutorials.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template