Php array reference

Source: Internet
Author: User
I want to know how her reference executes a process. This is a reference. When I remove the quotation marks, I want to know how her reference places arrays one by one.


I want to know how her reference executes a process.

This is referenced.
When I remove the quotation marks, I want to know how the array is put one by one.

Reply content:


I want to know how her reference executes a process.

This is referenced.
When I remove the quotation marks, I want to know how the array is put one by one.

After drawing a graph, we can see that the php array is a graph structure.
Traverse array if the current node has a parent node, put the current node under the parent node
Add the current node to $ tree [] if there is no parent node (that is, the root node).

When reference is used, the original value will change when you operate the reference. When the value is passed, another array will be generated when you operate.
This is equivalent to a value transfer when I tell you "a's separation" and ".

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.