_php techniques for array manipulation functions in PHP
Last Update:2017-01-19
Source: Internet
Author: User
Array ([key =>] value, [key =>] value, [key =>] value, [key =>] value)//key can be integer or string//value can be Is any value
Array_change_key_case--Returns an array of string keys that are all lowercase or uppercase
Array_chunk--Splits an array into multiple
Array_combine--Creates an array with the value of one array as its key name and the value of the other array as its value
Array_count_values--counts the number of occurrences of all values in the array
ARRAY_DIFF_ASSOC--the difference set of the computed array with index check
Array_diff_key--Using the key name comparison to compute the difference set of an array
ARRAY_DIFF_UASSOC--Using user supplied callback function to do index check to compute the difference set of array
Array_diff_ukey--Using callback function to compare the difference set of an array with a key name
Array_diff--Calculating the difference set of an array
Array_fill--Fills an array with a given value
Array_filter--filtering the cells in an array with a callback function
Array_flip--Exchanging keys and values in an array
ARRAY_INTERSECT_ASSOC--the intersection of computed arrays with an index check
Array_intersect_key--compute the intersection of arrays using a key name comparison
ARRAY_INTERSECT_UASSOC--the intersection of the computed array with the index check, using the callback function to compare the index
Array_intersect_ukey--Using the callback function to compare the key name to compute the intersection of the array
Array_intersect--compute the intersection of an array
Array_key_exists--Checks whether the given key name or index exists in the array
Array_keys--Returns all the key names in the array
Array_map--Functions The callback function to the cell of the given array
Array_merge_recursive--recursively merges one or more arrays
Array_merge--merging one or more arrays
Array_multisort--Sort multiple arrays or multidimensional arrays
Array_pad--Fills an array with a value to a specified length
Array_pop--Eject the last cell of the array (out of stack)
Array_product--Calculating the product of all the values in an array
Array_push--pushes one or more cells into the end of the array (into the stack)
Array_rand--to randomly remove one or more cells from an array
Array_reduce--iteratively simplifies an array to a single value with a callback function
Array_reverse--Returns an array of the opposite of a cell order
Array_search--Searches the array for a given value and returns the corresponding key name if successful
Array_shift--Move the cell at the beginning of the array to a group
Array_slice--take a paragraph out of an array
Array_splice--Remove part of the array and replace it with other values
Array_sum--computes the and of all the values in the array
ARRAY_UDIFF_ASSOC--the difference set of the computed array with index check, compare data with the callback function
ARRAY_UDIFF_UASSOC--the difference set of an array with an index check to compare data and indexes with a callback function
Array_udiff--Using callback functions to compare data to compute the difference set of an array
ARRAY_UINTERSECT_ASSOC--the intersection of the computed array with the index check, using the callback function to compare the data
ARRAY_UINTERSECT_UASSOC--the intersection of computed arrays with an index check to compare data and indexes with callback functions
Array_uintersect--computes the intersection of arrays, using callback functions to compare data
Array_unique--Removing duplicate values in an array of divisors
Array_unshift-Inserts one or more cells at the beginning of the array
Array_values--Returns all the values in the array
Array_walk_recursive--recursively apply user functions to each member in an array
Array_walk--Applying user functions to each member in an array
Array--Creates a new array
Arsort--To reverse-sort the array and keep the index relationship
Asort--Sort the array and keep the index relationship
Compact--Create an array that includes variable names and their values
Count (sizeof)--counts the number of cells in an array or the number of attributes in an object
Current--Returns the active cell in the array
Each--Returns the current key/value pair in the array and moves the array pointer one step forward
End--Points the array's internal pointer to the last cell
Extract--Import a variable from an array into the current symbol table
In_array--Check if a value exists in the array
Key--Gets the key name from the associative array
Krsort--the array of pairs in reverse order by key name
Ksort--sorting arrays by key name
List--Assign the values in the array to some variables
Natcasesort--Using the "natural sort" algorithm to sort the case-insensitive letters of the array
Natsort--Sorting the array with the "natural sort" algorithm next--Moves the internal pointer in the arrays forward one
POS--alias Prev of current ()--Returns an array's internal pointer back to a range--creates an array containing the specified range of cells