PHP 5 Array Functions

PHP 5 Array Functions 


Function
Description
Creates an array
Changes all keys in an array to lowercase or uppercase
Splits an array into chunks of arrays
Returns the values from a single column in the input array
Creates an array by using the elements from one "keys" array and one "values" array
Counts all the values of an array
Compare arrays, and returns the differences (compare values only)
Compare arrays, and returns the differences (compare keys and values)
Compare arrays, and returns the differences (compare keys only)
Compare arrays, and returns the differences (compare keys and values, using a user-defined key comparison function)
Compare arrays, and returns the differences (compare keys only, using a user-defined key comparison function)
Fills an array with values
Fills an array with values, specifying keys
Filters the values of an array using a callback function
Flips/Exchanges all keys with their associated values in an array
Compare arrays, and returns the matches (compare values only)
Compare arrays and returns the matches (compare keys and values)
Compare arrays, and returns the matches (compare keys only)
Compare arrays, and returns the matches (compare keys and values, using a user-defined key comparison function)
Compare arrays, and returns the matches (compare keys only, using a user-defined key comparison function)
Checks if the specified key exists in the array
Returns all the keys of an array
Sends each value of an array to a user-made function, which returns new values
Merges one or more arrays into one array
Merges one or more arrays into one array recursively
Sorts multiple or multi-dimensional arrays
Inserts a specified number of items, with a specified value, to an array
Deletes the last element of an array
Calculates the product of the values in an array
Inserts one or more elements to the end of an array
Returns one or more random keys from an array
Returns an array as a string, using a user-defined function
Replaces the values of the first array with the values from following arrays
Replaces the values of the first array with the values from following arrays recursively
Returns an array in the reverse order
Searches an array for a given value and returns the key
Removes the first element from an array, and returns the value of the removed element
Returns selected parts of an array
Removes and replaces specified elements of an array
Returns the sum of the values in an array
Compare arrays, and returns the differences (compare values only, using a user-defined key comparison function)
Compare arrays, and returns the differences (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
Compare arrays, and returns the differences (compare keys and values, using two user-defined key comparison functions)
Compare arrays, and returns the matches (compare values only, using a user-defined key comparison function)
Compare arrays, and returns the matches (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)
Compare arrays, and returns the matches (compare keys and values, using two user-defined key comparison functions)
Removes duplicate values from an array
Adds one or more elements to the beginning of an array
Returns all the values of an array
Applies a user function to every member of an array
Applies a user function recursively to every member of an array
Sorts an associative array in descending order, according to the value
Sorts an associative array in ascending order, according to the value
Create array containing variables and their values
Returns the number of elements in an array
Returns the current element in an array
Returns the current key and value pair from an array
Sets the internal pointer of an array to its last element
Imports variables into the current symbol table from an array
Checks if a specified value exists in an array
Fetches a key from an array
Sorts an associative array in descending order, according to the key
Sorts an associative array in ascending order, according to the key
Assigns variables as if they were an array
Sorts an array using a case insensitive "natural order" algorithm
Sorts an array using a "natural order" algorithm
Advance the internal array pointer of an array
Alias of current()
Rewinds the internal array pointer
Creates an array containing a range of elements
Sets the internal pointer of an array to its first element
Sorts an indexed array in descending order
Shuffles an array
Alias of count()
Sorts an indexed array in ascending order
Sorts an array by values using a user-defined comparison function
Sorts an array by keys using a user-defined comparison function
Sorts an array using a user-defined comparison function

Comments