Here are some commonly used PHP array functions, we will test the use of PHP array arrays OH
Sixth chapter (3) The correlation processing function of the array
Current (array name) outputs the value of a string in an array, starting with the first.
The key (array name) outputs an array of subscript, starting from the first.
Next (array name) controls the array pointer to move backwards.
Prev (array name) controls the array pointer to move forward.
End (array name) control array pointer moves to the last one.
Reset (array name) control the array pointer moves to the first position.
Array_change_key_case (1. The target array 2.case_upper uppercase or Case_lower lowercase) changes the array subscript all to uppercase or lowercase.
Array_chunk (1. Target array 2. Decomposition number 3. Output Boolean True or False) decomposes an array into multiple decimal groups.
The Array_count_values (array name) is used to calculate the number of occurrences of each value in the array.
Array_fill (1. Subscript starting from a few 2. Output how many 3, what their value is) used to do the initialization of the array.
Array_filter (1. Target array 2. User-defined functions) filter functions, customize what standards are true, what standard is false, this function can automatically filter out false strings.
Array_flip (target array) changes the subscript to a value, and the value is subscript.
Array_sum (the destination array) calculates the sum of all the element values in the destination array.
Array_unique (destination array) removes duplicate values from the target array.
Array_values (destination array) removes all subscripts from the target array and recalculates the subscript for the value in this function starting with "0".
Array_keys (destination array) outputs all the subscripts in the target array.
In_array (1) What to look for 2. Destination Array 3. Find the data in the target array with no lookup, whether it is strictly based on the data type, or true.
Array_search (1) What to look for 2. Target array 3. Find out if there is no lookup in the target array, and output the subscript for this data.
Array_key_exists (1. Subscript 2. Target array) Look for subscript with no lookup in the target array, output true, and no output false.
Extract (destination array) converts an array to a variable.
The compact (the variable subscript to convert the array) converts multiple variables to an array.
Arrays and stacks (advanced out)
Array_push (1. Target array 2. The value of the push stack) is pushed into the stack function.
Array_pop (target array) pop-up stack function.
Array with Team (first-in first out)
Array_unshift (1. Target array 2. The value of the pressed pair) is pressed into the function.
Array_shift (1 target array) pops up on the function.
Ignore array ordering of key names:
Sort (target array) sorted from small to large.
Rsort (target array) sorted from large to small.
Preserve array ordering of key names:
The Asort (target array) retains the original subscript, and the value is sorted from small to large.
The Arsort (target array) retains the original subscript, and the values are sorted from large to small.
Sorting by natural sort:
Natsort (target array) preserves the original subscript, and the values are sorted from large to small, case-insensitive.
Natcasesort (target array) retains the original subscript, the value from small to large sorting, case-insensitive.
Array_merge (1. Target array 2. Array of targets ...) merges multiple arrays.
Array_diff (1) is compared to the array 2. Compare array 3. ...) to find the difference product of an array.
Array_intersect (1) is compared to the array 2. Compare array 3. ...) to get the quadrature of an array.