PHP NOTE 2

Source: Internet
Author: User
One, array 1. The definition of an array:

In PHP, an array is a collection of data that is stored in a set. The elements in the array are called array elements, represented by the "key = = value" form. Where "key" is the distinguished name of an element array, and "value" is the contents of an array element.

In PHP, there are usually two ways to define an array:

(1). Use an assignment to define an array, create an array variable, and assign a value directly to the variable using the assignment operator:

$arr [] = ' PHP '; $arr [1] = ' C + + '

(2). Use the array () function to define arrays: the elements of an array are used as arguments, and the elements are separated by commas ', ':

$info Array (' If ' = 1, ' name = ' Tom ');

PHP NOTE 2

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.