PHP has a lot of functions about arrays to facilitate array manipulation.
Defined:
Each entity of an array contains two items: key and value, which can be retrieved by a query key. These keys can be numeric (numerical) or associated (associative)
Php array usage. 1. what is an array is a set of data, which organizes a series of data to form an operable whole. Each object in the array contains two items: Key and value. II. I. What is an array?
An array is a collection of data. it organizes a
1. What is an array?An array is a collection of data. It organizes a series of data to form an operable whole. Each object in the array contains two items: Key and value.Ii. Declare dataThere are two ways to declare arrays in PHP:First, apply the
We know that in the PHP array is divided into multi-dimensional arrays and one-dimensional arrays, we will explain the PHP multidimensional array and one-dimensional array sorting principle and implementation method.
One-dimensional arrays
The first
Subscript: The identifying name in the array is the code of the string or integer in the array
Several index values in an array are referred to as several-dimensional arrays.
Index value: An index is a structure that sorts the values of one or more
The declaration of an array
1, direct assignment way to declare an array
$ array variable name [index value] = data content//The index value (subscript) can be a string or a number
But sometimes, we can also assign values directly to the array,
Php Tutorial array Overview and array functionsThe array function allows you to operate on arrays.Php supports single-dimension and multi-dimensional arrays. At the same time, the database query results are provided to construct an array
PHP, a nested abbreviated name, is an abbreviation for the English Super Text preprocessing language (Php:hypertext preprocessor). PHP is an HTML embedded language, PHP and Microsoft's ASP quite a bit similar, is a server-side implementation of
This article for everyone to share the basic knowledge of PHP array functions for your reference, the specific contents are as follows
Array arrays are very important data types. It is more like a structure than other data types, and the result
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.