Each function usage

Source: Internet
Author: User
<?php/*each () is just a function, the argument is an array, and the returned value is an array 1. The returned value is also an array, the array is fixed with 4 elements, and the subscript is a fixed 1 (value) value (value) 0 (subscript) key (subscript) 2.each () Just handle the current element with the current element (the default current element is the first element, the pointer points to the first) to the array information, and after processing, the pointer moves down one element 3. If the pointer is already at the end, if you use each () to get the element, then return false*/$arr = Array ( "id" =>01, "name" = "Zhangsan", "addr" = "Shanghai"), $list = each ($arr);p rint_r ($list); echo "


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/76/02/wKioL1ZIOXbRbBBgAADDB3B_gjA274.jpg "title=" Qq20151115154857.jpg "alt=" Wkiol1zioxbrbbbgaaddb3b_gja274.jpg "/>

This article is from the "IT5808" blog, make sure to keep this source http://it5808.blog.51cto.com/10842703/1712907

Each function usage

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.