Love has its own destiny. Synopsis introduction of some functions of PHP operation array

Source: Internet
Author: User
Tags shuffle
Searches for a specific value in the array and returns TRUE if found returns false
Boolean In_array (mixed Needle,array Haystack[,boolean Strict])
Finds a specified health in the array, returns true if found or false
Boolean array_eky_exists (mixed Key,array array)
Searches for a specific value in the array and returns TRUE if found returns false
Boolean array_search (mixed Needle,array Haystack[,boolean Strict])
Gets a new array of all the key elements of the array
Array Array_keys (array array[,mixed search_value])
Gets a new array of all the values in the array
Array array_values (array array)
Determining the size of an array
Integer count (array array[,int mode])
Integer sizeof (array array[,int mode])
Statistical array element Occurrence frequency
Array array_count_values (array array)
Removes duplicate values from an array, returning an array of unique values
Array array_unique (array array)
Inverse array element order, Preserve_key If true, the array key value order is unchanged
Array array_reverse (array Array[,boolean Preserve_key])
Permutation array keys and values
Array array_flip (array array)
Array order ordering, sort_flags parameter optional, default behavior
Sort_numberic, sorted by value, useful for ordering integers or floating-point numbers
Sort_regular, sorted by ASCII value
Sort_string, sorted according to the right order of the people they knew.
Asort function key value order unchanged
void sort (array array[,int sort_flags])
void Asort (array array[,int sort_flags])
Array in reverse order, sort_flags parameter optional, default behavior
Sort_numberic, sorted by value, useful for ordering integers or floating-point numbers
Sort_regular, sorted by ASCII value
Sort_string, sorted according to the right order of the people they knew.
Arsort function key value order unchanged
void Rsort (array array[,int sort_flags])
void Arsort (array array[,int sort_flags])
Array Natural Sorting
void Natsort (array array)
Case-insensitive natural sorting
void Natcasesort (array array)
To sort the key values in an array
Boolean ksort (array array[,int sort_flags])
Order of the key values in the reverse sequence
Boolean krsort (array array[,int sort_flags])
Sort by user-defined order
void Usort (array array,callback function_name)
Merges the arrays together to return an array of unions. Array_merge is covered in front, Array_merge_recursive merged together
Array Array_merge (array Array1[array array2 ...]) More than one
Array array_merge_recursive (array Array1,array array2[,array ...]) More than two
Keys and values make up a new array
Array array_combine (array Key,array value)
Returns the part of an array, starting with the offset, to the end of the offse+length position
Array array_slice (array array, int offset [, int length])
Removes all elements from offset start to end of Offset+length and returns the deleted element as an array
Array Array_splice (array, int offset [, int length[,array peplacement]])
To find the intersection of the array, the key value is the first array of key values
Array array_intersect (array Array1,array array2[,arrayn ...])
The intersection of the array contains the key values equal to the key values in the first array
Array Array_intersect_assoc (array Array1,array array2[,arrayn ...])
To find the difference set of the array, the first array has no value in the other array
Array Array_diff (array Array1,array array2[,arrayn ...])
To find the difference set of the array, the first array in the other array does not have values that contain the key values equal
Array Array_diffassoc (array Array1,array array2[,arrayn ...])
Returns one or more key values in an array
Mixed Array_rand (array array[,int num_entries])
Shuffle function immediately
void Shuffle (array input_array)
Sum the values in an array
Mixed array_sum (array array);
Decomposes an array into a multidimensional array that contains a size element
Array array_chunk (array array, int size [, Boolean Preserve_keys])

The above describes the love of the fate of the heart of the plot introduction of the PHP operation of some of the functions of the array, including the love of its own fate of the heart of the story of the content, I hope that the PHP tutorial interested in a friend helpful.

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