Array manipulation functions in PHP _php tutorial

Source: Internet
Author: User
Array ([key =>] value, [key =>] value, [key =>] value, [key =>] value)//key can be an integer or string//value can be Is any value

Array_change_key_case--Returns an array with string key names all lowercase or uppercase

Array_chunk--Splitting an array into multiple

Array_combine-Creates an array with the value of an array as its key name, and the value of another array as its value

Array_count_values--Number of occurrences of all values in the statistics array

ARRAY_DIFF_ASSOC--the difference set of the computed array with index check

Array_diff_key--Using the key name to compare the difference set of the computed array

ARRAY_DIFF_UASSOC--Use the user-supplied callback function to do an index check to calculate the difference set of the array

Array_diff_ukey--Using a callback function to compare the difference set of an array to a key name

Array_diff--Calculating the difference set of arrays

Array_fill--Fills an array with the given value

Array_filter--Filter cells in an array with a callback function

Array_flip--Exchanging keys and values in an array

ARRAY_INTERSECT_ASSOC--with index check the intersection of computed arrays

Array_intersect_key--computes the intersection of an array using the key name comparison

ARRAY_INTERSECT_UASSOC--with index check the intersection of computed arrays, using callback function to compare indexes

Array_intersect_ukey--Use the callback function to compare the key names to calculate the intersection of the arrays

Array_intersect--Calculating the intersection of arrays

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--Function The callback function on the cell of the given array

Array_merge_recursive--recursively merging one or more arrays

Array_merge--merging one or more arrays

Array_multisort-Sort multiple arrays or multidimensional arrays

Array_pad--fills the array with values to a specified length

Array_pop--pops the last element of the array (out of the stack)

Array_product--Calculates the product of all values in an array

Array_push--presses one or more cells into the end of the array (into the stack)

Array_rand--random extraction of one or more cells from an array

Array_reduce--iteratively simplifying the array to a single value with a callback function

Array_reverse--Returns an array of cells in reverse order

Array_search--searches for the given value in the array, and returns the corresponding key name if successful

Array_shift--Moves the cell at the beginning of the array to a group

Array_slice--Remove a paragraph from the array

Array_splice--Remove part of the array and replace it with other values

Array_sum--Calculates the and of all values in the array

ARRAY_UDIFF_ASSOC--With index check to calculate the difference set of the array, compare the data with the callback function

ARRAY_UDIFF_UASSOC--With index check to calculate the difference of the array, compare the data and index with the callback function

Array_udiff--comparing data with a callback function to calculate the difference set of an array

ARRAY_UINTERSECT_ASSOC--with index check the intersection of the computed array, compare the data with the callback function

ARRAY_UINTERSECT_UASSOC--with index check the intersection of computed arrays, using callback functions to compare data and indexes

Array_uintersect--computes the intersection of an array and compares the data with a callback function

Array_unique--Removes duplicate values from the divisor group

Array_unshift--inserting one or more cells at the beginning of the array

Array_values--Returns all values in the array

Array_walk_recursive--Apply user functions recursively to each member in an array

Array_walk--Apply user functions to each member in an array

Array--Create a new array

Arsort-Reverse sorting an array and keep the index relationship

Asort-Sort the array and keep the index relationship

Compact-Create an array, including the 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 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 inner pointer of the array to the last cell

Extract--Import variables from an array into the current symbol table

In_array--Checks if a value exists in the array

Key--Get the key name from the associative array

Krsort--Reverse order of array by key name

Ksort--sorting arrays by key name

List--assigns the values in the array to some variables

Natcasesort--Using the "natural sort" algorithm to sort the case-insensitive letters of an array

Natsort--Using the "natural sort" algorithm to sort the arrays next--Move the inner pointer in the array forward one

POS--The alias of current () prev--Returns the internal pointer of the array back to a range--creates an array containing the specified range of cells

http://www.bkjia.com/PHPjc/319290.html www.bkjia.com true http://www.bkjia.com/PHPjc/319290.html techarticle Array ([key =] value, [key =] value, [key =] value, [key =] value)//key can be an integer or string//value can be any value Array_c Hange_key_case--Return string key name full ...

  • 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.