For beginners, use variable values for variable names-php Tutorial

Source: Internet
Author: User
The Cainiao question uses the variable value as the variable name PHPcode & lt ;? Php $ a1; $ b2; $ c & quot; LL & quot;. $ a. $ B; $ c & quot; asdf & quot; echo $ LL12 ;? & Gt; I want the names of a variable in life to be $ LL12 followed by 1 and 2. is there any simple method based on AB? don't use the intermediate variable $ c ------ solution ---------- The Cainiao problem is done with the variable value? variable name
PHP code
  

  

I want to keep a variable
The name is
$ LL12
The following 1 and 2 are based on AB. Is there any simple method to remove the intermediate variable $ c?

------ Solution --------------------
PHP code
$ A = 1; $ B = 2; eval ("\ $ LL $ a $ B = \" asdf \ ";"); echo $ LL12;

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.