Commonly used array functions in PHP

Source: Internet
Author: User

all you know. PHP array-related functions?

Array ()----Create arrays

Array_combine ()----Create a new array by merging two arrays

Range ()----creates and returns an array containing the elements of the specified range

Compact ()----Create an array

The Array_chunk ()----splits an array into multiple

Array_merge ()----merge two or more arrays into an array

Array_slice ()----Remove a value in an array based on conditions

Array_diff ()----Returns an array of difference sets for two arrays

Array_intersect ()----computes the intersection of an array

Array_search ()----search for the given value in the array

Array_splice ()----Remove part of the divisor group and replace it

Array_key_exists ()----Determine if the specified key exists in an array

Shuffle ()----rearrange the elements in the array in random order

Array_flip ()----Exchange keys and values in an array

Array_reverse ()----flips the order of elements in the original array, creates a new array, and returns

Array_unique ()----To remove duplicate values from the divisor group

Commonly used array functions in PHP

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.