SearchEngineChannel

Looking for somewhere to host your site? Browse our PHP web hosts section!

Home > Quick Reference Library > Date and Time Functions

Array Functions

These functions allow you to interact with and manipulate arrays in various ways. Arrays are essential for storing, managing, and operating on sets of variables.

Simple and multi-dimensional arrays are supported, and may be either user created or created by another function. There are specific database handling functions for populating arrays from database queries, and several functions return arrays.

Please see the Arrays section of the manual for a detailed explanation of how arrays are implemented and used in PHP. See also Array operators for other ways how to manipulate the arrays.

array_change_key_case
Returns an array with all string keys lowercased or uppercased
array_chunk
Split an array into chunks
array_combine
Creates an array by using one array for keys and another for its values
array_count_values
Counts all the values of an array
array_diff_assoc
Computes the difference of arrays with additional index check
array_diff_uassoc
Computes the difference of arrays with additional index check which is performed by a user supplied callback function
array_diff
Computes the difference of arrays
array_fill
Fill an array with values
array_filter
Filters elements of an array using a callback function
array_flip
Exchanges all keys with their associated values in an array
array_intersect_assoc
Computes the intersection of arrays with additional index check
array_intersect
Computes the intersection of arrays
array_key_exists
Checks if the given key or index exists in the array
array_keys
Return all the keys of an array
array_map
Applies the callback to the elements of the given arrays
array_merge_recursive
Merge two or more arrays recursively
array_merge
Merge two or more arrays
array_multisort
Sort multiple or multi-dimensional arrays
array_pad
Pad array to the specified length with a value
array_pop
Pop the element off the end of array

More Array functions