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

See also is_array(), explode(), implode(), split() and join().

Table of Contents
array — Create an array
array_count_values — Counts all the values of an array
array_diff — Computes the difference of arrays
array_flip — Flip all the values of an array
array_intersect — Computes the intersection of arrays
array_keys — Return all the keys of an array
array_merge — Merge two or more arrays
array_merge_recursive — Merge two or more arrays recursively
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
array_push — Push one or more elements onto the end of array
array_rand — Pick one or more random entries out of an array
array_reverse — Return an array with elements in reverse order
array_shift — Pop an element off the beginning of array
array_slice — Extract a slice of the array
array_splice — Remove a portion of the array and replace it with something else
<