PHP Processing Array Functions Daquan

Source: Internet
Author: User
Tags sorts

PHP: Indicates the earliest version of PHP that supports this function.    The function Description Phparray () creates an array.    3array_change_key_case () returns an array whose keys are both uppercase and lowercase.    4array_chunk () splits an array into a new array block.    4array_combine () Creates a new array by merging two arrays.    5array_count_values () is used to count the occurrences of all values in the array.    4array_diff () returns an array of difference sets for two arrays.    4ARRAY_DIFF_ASSOC () compares key names and key values, and returns an array of two arrays of differences.    4array_diff_key () compares the key name and returns an array of difference sets for two arrays.    5ARRAY_DIFF_UASSOC () computes the difference set of the array by indexing the user-supplied callback function.    5array_diff_ukey () computes the difference set of the array by using the callback function to compare the key names.    5array_fill () fills the array with the given value.    4array_filter () filters the elements in the array with a callback function.    4array_flip () Swaps the keys and values in the array.    4array_intersect () computes the intersection of the array.    4ARRAY_INTERSECT_ASSOC () compares the key name and key value, and returns an array of two arrays of intersections.    4array_intersect_key () computes the intersection of an array using the key name comparison.    The 5ARRAY_INTERSECT_UASSOC () index checks the intersection of the computed array, using the callback function to compare the indexes.    5array_intersect_ukey () computes the intersection of the array using the callback function to compare the key names.    5array_key_exists () checks whether the given key name or index exists in the array.    4array_keys () returns all the key names in the array.    4array_map () functions The callback function on the cell of the given array.    4array_merge () merges one or more arrays into an array.    4array_merge_recursive () recursively merges one or more arrays. 4array_multisort ()   Sorts multiple arrays or multidimensional arrays.    4array_pad () fills the array to the specified length with a value.    4array_pop () pops the last element of the array (out of the stack).    4array_product () computes the product of all the values in the array.    5array_push () presses one or more cells (elements) into the end of the array (into the stack).    4array_rand () randomly selects one or more elements from the array and returns them.    4array_reduce () iteratively simplifies the array to a single value using a callback function.    4array_reverse () flips the order of elements in the original array, creates a new array, and returns.    4array_search () searches the array for the given value and returns the corresponding key name if successful.    4array_shift () deletes the first element in the array and returns the value of the deleted element.    4array_slice () takes a value out of the array and returns it as a condition.    4array_splice () removes part of the array and replaces it with other values.    4array_sum () computes the and of all values in the array.    4array_udiff () compares the data with the callback function to calculate the difference set of the array.    5ARRAY_UDIFF_ASSOC () with index check computes the difference set of the array, using the callback function to compare the data.    5ARRAY_UDIFF_UASSOC () takes an index check to calculate the difference set of the array, using the callback function to compare the data and index.    5array_uintersect () computes the intersection of the array, using the callback function to compare the data.    The 5ARRAY_UINTERSECT_ASSOC () index checks the intersection of the computed array and compares the data with the callback function.    The 5ARRAY_UINTERSECT_UASSOC () index checks the intersection of the computed array, using the callback function to compare the data and the index.    5array_unique () deletes duplicate values in the array.    4array_unshift () inserts one or more elements at the beginning of the array.    4array_values () returns all the values in the array.    4array_walk () applies a user function to each member in the array. 3array_walk_recursive () Apply user functions recursively to each member in an array。    5arsort () Reverses the order of the array and maintains the index relationship.    3asort () sorts the array and maintains the index relationship.    3compact () establishes an array, including the variable names and their values.    4count () calculates the number of elements in an array or the number of attributes in an object.    3current () returns the current element in the array.    3each () returns the current key/value pair in the array and moves the array pointer forward one step.    3end () points the inner pointer of the array to the last element.    3extract () Imports variables from the array into the current symbol table.    3in_array () checks whether the specified value exists in the array.    4key () Gets the key name from the associative array.    The 3krsort () array is reversed by key name.    The 3ksort () array is sorted by key name.    3list () assigns the values in the array to some variables.    3natcasesort () uses the "natural sort" algorithm to sort an array of case-insensitive letters.    4natsort () sorts the array using the "natural sort" algorithm.    4next () Moves the inner pointer in the array forward one bit.    The alias of the 3pos () current ().    3prev () returns the inner pointer of the array back to one bit.    3range () creates an array of elements that contain the specified range.    3reset () points the inner pointer of the array to the first element.    3rsort () reverse-order the array.    3shuffle () rearranges the elements in the array in random order.    The alias of the 3sizeof () count ().    3sort () sorts the array.    3uasort () Sorts the values in the array using a user-defined comparison function and keeps the index associated.    3uksort () Sorts the key names in the array using a user-defined comparison function.    3usort () Sorts the values in the array using a user-defined comparison function. 3PHP Array constant PHP: Indicates the earliest version of PHP that supports this constant.     The constant description Phpcase_lower converts the array key name to lowercase letters in array_change_key_case (). CaSe_upper converts the array key name to uppercase in Array_change_key_case ().     SORT_ASC is used in the Array_multisort () function to keep it in ascending order.     Sort_desc is used in the Array_multisort () function to keep it in descending order.     The sort_regular is used to perform a common comparison of objects.     The sort_numeric is used to compare objects numerically.     Sort_string is used for string comparisons of objects.    Sort_locale_string A string comparison of objects based on the current region. 4count_normal count_recursive extr_overwrite extr_skip extr_prefix_same extr_            Prefix_all extr_prefix_invalid extr_prefix_if_exists extr_if_exists extr_refs

PHP Processing Array Functions Daquan

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.