PHP idiomatic arrays

Source: Internet
Author: User
PHP Common arrays

Array ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Create an array.?????
Array_change_key_case ()??? ?? ?? Returns an array whose keys are uppercase or lowercase.?????
Array_chunk ()????? ?? ?? ?? ?? ?? ??? Splits an array into a new array block.?????
Array_combine ()????? ?? ?? ?? ?? ?? ??? Create a new array by merging two arrays.?????
Array_count_values ()??? ?? ?? ?? ? used to count the occurrences of all the values in the array.?????
Array_diff ()????? ?? ?? ?? ?? ?? ??? Returns an array of difference sets for two arrays.?????
Array_diff_assoc ()????? ?? ?? ?? ?? ? Compares key names and key values, and returns an array of two array of differences.?????
Array_diff_key ()????? ?? ?? ?? ?? ? Compares a key name and returns an array of two array of differences.?????
Array_diff_uassoc ()????? ?? ?? ?? ?? ? The error set of the array is computed by indexing the user-supplied callback function.
Array_diff_ukey ()????? ?? ?? ?? ?? ? Use the callback function to compare the difference of the array to the key name.
Array_fill ()????? ?? ?? ?? ?? ?? ??? Populates the array with the given values.?????
Array_filter ()????? ?? ?? ?? ?? ?? ??? Filters the elements in the array with a callback function.?????
Array_flip ()????? ?? ?? ?? ?? ?? ??? Swaps the keys and values in the array.?????
Array_intersect ()????? ?? ?? ?? ?? ? Computes the intersection of an array.?????
Array_intersect_assoc ()??? ?? ?? ? compares key names and key values, and returns an array of two arrays of intersections.?????
Array_intersect_key ()??? ?? ?? ??? Computes the intersection of an array using the key name comparison.?????
Array_intersect_uassoc ()??? ?? ??? With index check the intersection of the computed array, the index is compared with the callback function.?????
Array_intersect_ukey ()??? ?? ?? ? Use the callback function to compare the key names to calculate the intersection of the 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 ()????? ?? ?? ?? ?? ?? ??? Combine one or more arrays into an array.?????
Array_merge_recursive ()??? ?? ?? ? recursively merges one or more arrays.?????
Array_multisort ()????? ?? ?? ?? ?? ? Sorts multiple arrays or multidimensional arrays.?????
Array_pad ()????? ?? ?? ?? ?? ?? ?? ?? ? Fill the array with values to a specified length.?????
Array_pop ()????? ?? ?? ?? ?? ?? ?? ?? ? pops the last cell of the array (out of the stack).?????
Array_product ()????? ?? ?? ?? ?? ?? ??? Computes the product of all the values in the array.?????
Array_push ()????? ?? ?? ?? ?? ?? ??? Presses one or more cells (elements) into the end of the array (into the stack).?????
Array_rand ()????? ?? ?? ?? ?? ?? ??? Randomly selects one or more elements from the array and returns the.?????
Array_reduce ()????? ?? ?? ?? ?? ?? ??? Use the callback function to iteratively simplify the array to a single value.?????
Array_reverse ()????? ?? ?? ?? ?? ?? ??? Flips the order of elements in the original array, creates a new array, and returns the.?????
Array_search ()????? ?? ?? ?? ?? ?? ??? Searches the array for the given value, and if successful returns the corresponding key name.?????
Array_shift ()????? ?? ?? ?? ?? ?? ??? Deletes the first element in the array and returns the value of the deleted element.?????
Array_slice ()????? ?? ?? ?? ?? ?? ??? Takes a value out of a condition in the array and returns the.?????
Array_splice ()????? ?? ?? ?? ?? ?? ??? Remove part of the array and replace it with other values.?????
Array_sum ()????? ?? ?? ?? ?? ?? ?? ?? ? Computes the value of all the values in the array.?????
Array_udiff ()????? ?? ?? ?? ?? ?? ??? Use the callback function to compare the data to calculate the difference set of the array.?????
Array_udiff_assoc ()????? ?? ?? ?? ?? ? With index check to calculate the difference set of the array, using the callback function to compare the data.?????
Array_udiff_uassoc ()????? ?? ?? ?? ? With index Check the difference set of the computed array, using the callback function to compare the data and index.?????
Array_uintersect ()????? ?? ?? ?? ?? ? Computes the intersection of the array, using the callback function to compare the data.?????
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 the computed array, using the callback function to compare the data and index.?????
Array_unique ()????? ?? ?? ?? ?? ?? ??? Delete the duplicate values in the array.?????
Array_unshift ()????? ?? ?? ?? ?? ?? ??? Inserts one or more elements at the beginning of the array.?????
Array_values ()????? ?? ?? ?? ?? ?? ??? Returns all the values in the array.?????
Array_walk ()????? ?? ?? ?? ?? ?? ??? Applies the user function to each member of the array.?????
Array_walk_recursive ()??? ?? ?? ? Each member of the array is recursively applied to the user function.?????
Arsort ()????? ?? ?? ?? ?? ?? ?? ?? ? The array is reversed and the index relationship is maintained.?????
Asort ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Sort the array and keep the index relationship.?????
Compact ()????? ?? ?? ?? ?? ?? ?? ?? ? Create an array, including the variable names and their values.?????
Count ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Calculates the number of elements in an array or the number of attributes in an object.?????
Current ()????? ?? ?? ?? ?? ?? ?? ?? ? Returns the current element in the array.?????
Each ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Returns the current key/value pair in the array and moves the array pointer forward one step.?????
End ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Points the inner pointer of the array to the last element.?????
Extract ()????? ?? ?? ?? ?? ?? ?? ?? ? Import variables from an array into the current symbol table.?????
In_array ()????? ?? ?? ?? ?? ?? ?? ?? Checks whether the specified value exists in the array.?????
Key ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Gets the key name from the associative array.?????
Krsort ()????? ?? ?? ?? ?? ?? ?? ?? The array is reversed by the key name.?????
Ksort ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? The array is sorted by key name.?????
List ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Assign the values in the array to some variables.?????
Natcasesort ()????? ?? ?? ?? ?? ?? ??? Use the "natural sort" algorithm to sort the case-insensitive letters of an array.
Natsort ()????? ?? ?? ?? ?? ?? ?? ?? ? Use the "natural sort" algorithm to sort the array.?????
Next ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Moves the inner pointer in the array forward one bit.?????
POS ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? The alias of current ().?????
Prev ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? The internal pointer of the array is inverted back to a bit.?????
Range ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Creates an array of elements that contain the specified range.?????
Reset ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Points the inner pointer of the array to the first element.?????
Rsort ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Reverse sequence of an array.?????
Shuffle ()????? ?? ?? ?? ?? ?? ?? ?? Rearrange the elements in the array in random order.?????
sizeof ()????? ?? ?? ?? ?? ?? ?? ?? The alias of the. Count ().?????
Sort ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Sort the array.?????
Uasort ()????? ?? ?? ?? ?? ?? ?? ?? ? Use a user-defined comparison function to sort the values in the array and keep the index associated.?????
Uksort ()????? ?? ?? ?? ?? ?? ?? ?? ? Use a user-defined comparison function to sort the key names in the array.?????
Usort ()????? ?? ?? ?? ?? ?? ?? ?? ?? ? Use a user-defined comparison function to sort the values in the 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.