An array of PHP variables and type extensions and an array function encyclopedia

Source: Internet
Author: User
Tags aliases

I. Overview and Installation

These functions allow you to use and manipulate arrays in different ways. Arrays are essential tools for storing, managing, and manipulating variables.

PHP supports simple arrays and multidimensional arrays, which can be created by the user themselves or by other functions. There are a number of special database processing functions that can return an array from a database query and some functions that return an array.

Refer to the section on arrays to learn more about how arrays are implemented and used in PHP.

Using these functions does not require installation, they are part of the PHP core.

Second, the array function Daquan

array_change_key_case-returns an array of string key names that are all lowercase or uppercase

array_chunk-splits an array into multiple

array_column-returns a column specified in the array

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-the number of occurrences of all values in the statistics array

array_diff_assoc-with index Check the difference set of the computed array

array_diff_key-Calculating the difference set of an array using the key name comparison

array_diff_uassoc-uses 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 an array

array_fill_keys-fills an array with the specified key and value

array_fill-fills an array with the given value

array_filter-filter cells in an array with callback functions

Array_flip-exchanging keys and values in an array

array_intersect_assoc-with index Check the intersection of computed arrays

array_intersect_key-calculating 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-computes the intersection of an array using a callback function to compare the key names

Array_intersect-computes 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-the callback function to the cell of the given array

array_merge_recursive-to merge one or more arrays recursively

array_merge-merging one or more arrays

array_multisort-to sort multiple arrays or multidimensional arrays

Array_pad-fills an array to a specified length with a value

array_pop-pops the last cell of the array (out of the stack)

Array_product-computes the product of all values in an array

array_push-pressing 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 to simplify the array to a single value with a callback function

Array_replace_recursive-replaces the elements of the first array with the passed array recursion

Array_replace-replaces the elements of the first array with the passed array

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 an array

array_splice-remove part of the array and replace it with other values

Array_sum-computes the and of all values in the array

array_udiff_assoc-with index Check the difference set of the computed array, using the callback function to compare the data

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 callback functions to calculate the difference set of an array

array_uintersect_assoc-with index Check the intersection of the computed array, using the callback function to compare the data

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, compares the data with a callback function

array_unique-duplicate values in an array

array_unshift-inserting one or more cells at the beginning of an array

array_values-returns all values in the array

array_walk_recursive-applying user functions recursively to each member in an array

array_walk-applying user functions to each member in an array

array-creating a new array

arsort-an array in reverse order and maintain an index relationship

asort-sorting an array and maintaining an index relationship

compact-create an array, including the variable names and their values

count-count the number of cells in an array or the number of properties in an object

current-returns the current cell in the array

each-returns the current key/value pair in the array and moves the array pointer forward one step

end-the inner pointer of an array to the last cell

extract-importing variables from an array into the current symbol table

in_array-checks if a value exists in the array

key_exists-alias Array_key_exists

key-getting the key name from the associative array

krsort-an array in reverse order by key name

ksort-sorting arrays by key name

List-assigns the values in the array to some variables

natcasesort-sorting of case-insensitive letters using the "natural sort" algorithm for arrays

natsort-using the "natural sort" algorithm to sort arrays

next-moves the inner pointer in the array forward one

Aliases for Pos-current

prev-the internal pointer of the array back to a

range-creating an array containing the specified range of cells

reset-the inner pointer of an array to the first cell

rsort-reverse sequence of an array

shuffle-Array is scrambled

Aliases for Sizeof-count

sort-sorting an array of arrays

uasort-use a user-defined comparison function to sort the values in the array and keep the index associated

uksort-using a user-defined comparison function to sort the key names in an array

usort-using a user-defined comparison function to sort values in an array

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