1. The concept of arrays
An array is a named range that is used to store a series of variable values.
Each array element has an associated index (also a keyword) that can be used to access elements.
PHP allows you to use numbers or strings evenly
basic functions of array manipulationThe key name and value of the arrayArray_values ($arr); Gets the value of the array Array_keys ($arr), gets the key name of the array array_flip ($arr), and the values in the array are exchanged with the key
Basic functions of array manipulationThe key name and value of the arrayArray_values ($arr); Get the value of an arrayArray_keys ($arr); Gets the key name of the arrayArray_flip ($arr); the values in the array are exchanged with the key names (if
In PHP, the values stored in the array become array elements, the array has a one-dimensional array and a multidimensional array, and the index of each array element is also called the keyword, and access to the array elements can be indexed.
PHP array is an essential part of PHP, the array function also has a very important role, this article for you to organize a PHP development in the array operations, including the basic functions of array operations, array of fragments and fills,
The array in PHP is actually an ordered map. A mapping is a type that associates values to the keys. This type is optimized in many ways, so you can think of it as a real array, or a list (vector), a hash list (an implementation of a map), a
The process of learning PHP, sorting out some of the commonly used functions, which are array functions.
Array (): Generate an array$a = Array ("Dog", "cat", "horse");Print_r ($a); Array ([0] = dog [1] = cat [2] = = horse)Array_combine ():
Is_array(PHP 4, PHP 5, PHP 7)is_array- Detecting If a variable is an arrayIs_array Mixed $var )If var it is an array, TRUE It is returned FALSE , otherwise.
Explode(PHP 4, PHP 5, PHP 7)explode- using one string to split another stringArray
This article mainly introduces the PHP array to remove the duplicate values of the method, interested in the friend's reference, I hope to be helpful to everyone.
Overview
Using PHP's Array_unique () function allows you to pass an array, and then
Php array operations
If you are still struggling to find the php array operation method, you must not miss this article, the most comprehensive php array operation method, and hope to help you.I. basic functionsKey name and value of the
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.