How does php parse variables when echo outputs?

Source: Internet
Author: User
For example, the above code is not valid and cannot be obtained as expected. after checking the code, I think it is a variable & quot; $ xxx & quot; the first line has been parsed, but it is not defined in the first line & quot; $ xxx & quot, so if you don't get the value, how can you let the variable parse this & quot; $ xxx & quot; variable in the output to get this & quot; abc666abc & quot? Online and so on. if you want to pass by, don't give me some advice. thank you! Php

For example:
$ A = "abc {$ xxx} abc ";
$ Xxx = "666 ";
Echo $;
?>
The above code is invalid and cannot get the expected "abc666abc"
After checking the code, the variable "$ xxx" is parsed in the first line,
But in the first line "$ xxx" is not defined, so the value is not obtained.
How can I parse the "$ xxx" variable in the output and get the "abc666abc" variable?

Online and so on. if you want to pass by, don't give me some advice. thank you!

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.