[PHP string] this is a magical problem today. please help me.

Source: Internet
Author: User
[PHP string] an amazing problem today. please help me with error 1:
Echo 'echo $ rst4 [$ I] ["tb_restore_content"]:
'; Echo $ rst4 [$ I] ['TB _ restore_content']."

"; Echo 'echo $ rst4 [$ I] [" tb_restore_content "] content:
'; Echo'[Reply: sasasa][Reply: sasasa] 0
1

2 ';

Running result

Some labels are not parsed when the variable a is output directly. because double quotation marks are added to it, the following error occurs:
Error 2
echo is_string($rst4[$i]['tb_restore_content']);echo "$rst4[$i]['tb_restore_content']";

Result


Reply to discussion (solution)

Why? Can't you see why?

It's amazing!
The magic of Error 1 is that you didn't clarify the problem
For error 2, the magic is that you did not follow the php writing rules
Echo "$ rst4 [$ I] ['TB _ restore_content ']";
Ying writing
Echo "{$ rst4 [$ I] ['TB _ restore_content ']}";
Or
Echo $ rst4 [$ I] ['TB _ restore_content '];

It's amazing!
The magic of Error 1 is that you didn't clarify the problem
For error 2, the magic is that you did not follow the php writing rules
Echo "$ rst4 [$ I] ['TB _ restore_content ']";
Ying writing
Echo "{$ rst4 [$ I] ['TB _ restore_content ']}";
Or
Echo $ rst4 [$ I] ['TB _ restore_content '];


Yes, I haven't noticed it for a while.

Why? Can't you see why?


Error 2: As you said, Error 1 indicates that a string contains tags, but it is not parsed when I output this variable,

It's amazing!
The magic of Error 1 is that you didn't clarify the problem
For error 2, the magic is that you did not follow the php writing rules
Echo "$ rst4 [$ I] ['TB _ restore_content ']";
Ying writing
Echo "{$ rst4 [$ I] ['TB _ restore_content ']}";
Or
Echo $ rst4 [$ I] ['TB _ restore_content '];


Error 2: As you said, Error 1 indicates that a string contains tags, but it is not parsed when I output this variable.

Then, describe the problem carefully.
If variables are involved, the values of the variables must be given separately.




It's amazing!
The magic of Error 1 is that you didn't clarify the problem
For error 2, the magic is that you did not follow the php writing rules
Echo "$ rst4 [$ I] ['TB _ restore_content ']";
Ying writing
Echo "{$ rst4 [$ I] ['TB _ restore_content ']}";
Or
Echo $ rst4 [$ I] ['TB _ restore_content '];


Error 2: As you said, Error 1 indicates that a string contains tags, but it is not parsed when I output this variable.


0

Then, describe the problem carefully.
If variables are involved, the values of the variables must be given separately.


For example
$ A ='

[Reply: sasasa] 0

2'

Echo $ a outputs a string that is not parsed, or, p or p.
Echo'

[Reply: sasasa] 0

2'
Then there is no problem

Is there anything wrong?

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.