Newbie asks a simple question

Source: Internet
Author: User
Newbie asks a simple question foreach ($ _ POST ['loginform'] as $ name => $ value)

What does the red part mean?


Reply to discussion (solution)

=> Indicates an array member.
Subscript or join key on the left and value on the right


You can understand it as a format, just like creating an array $ arr = array ($ key => $ value). the left side represents the subscript, associated key value, and the right side is the value.

Foreach ($ _ POST ['loginform'] as $ name => $ value)

This is what I just learned, right ..
Traverse $ name => $ value (key-value pair) and put it in the $ _ POST ['loginform'] array

But what does loginForm mean?

The red part indicates "corresponding", that is, the member val value corresponding to the key in the array.

Key indicates the value of the position val => indicates the value corresponding to the position.

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.