Array functions

  • array_change_key_case – It converts the keys of an array into uppercase
  • array_chunk – It splits an array into chunks
  • array_combine – It creates an array by using one array for keys and another for its values
  • array_count_values – It counts all the values of an array
  • array_diff_assoc – It computes the difference of arrays with additional index check
  • array_diff_key – It computes the difference of arrays using keys for comparison
  • array_diff_uassoc – It computes the difference of arrays with additional index
  • array_diff_ukey – It computes the difference of arrays using a callback function on the keys for comparison
  • array_diff – It finds the difference of arrays
  • array_fill_keys – It fills an array with values, specifying keys
  • array_fill – It fills an array with the given values
  • array_filter – It filters elements of an array using a callback function
  • array_flip – It exchanges all keys with their associated values in an array
  • array_intersect_assoc – It finds the intersection of arrays with additional index check
  • array_intersect_key – It finds the intersection of arrays using keys for comparison
  • array_intersect_uassoc – It finds the intersection of arrays with additional index check, compares indexes by a callback function
  • array_intersect_ukey – It finds the intersection of arrays using a callback function on the keys for comparison
  • array_intersect – It finds the intersection of arrays
  • array_key_exists – It checks if the given key or index exists in the array
  • array_keys – It returns all the keys or a subset of the keys of an array
  • array_map – It applies the callback to the elements of the given arrays
  • array_merge_recursive – It merges two or more arrays recursively
  • array_merge – It merge arrays
  • array_multisort – It sorts multiple or multi-dimensional arrays
  • array_pad – It pads array to the specified length with a value
  • array_pop – It pops the last element of an array
  • array_product – It finds the product of values in an array
  • array_push It pushes one or more elements onto the end of array
  • array_rand – It fetches one or more random entries out of an array
  • array_reduce – It reduce the array to a single value using a callback function
  • array_replace_recursive – It replaces elements from passed arrays into the first array recursively
  • array_replace – It replaces elements from passed arrays into the first array
  • array_reverse – It returns an array with elements in reverse order
  • array_search – It searches the array for a given value
  • array_shift – It shift an element off the beginning of array
  • array_slice – It extracts a slice of the array
  • array_splice – It removes a portion of the array and replace it with something else
  • array_sum – It finds the sum of values in an array
  • array_udiff_assoc – It finds the difference of arrays with additional index check
  • array_udiff_uassoc – It finds the difference of arrays with additional index check
  • array_udiff – It finds the difference of arrays by using a callback function for data comparison
  • array_uintersect_assoc – It finds the intersection of arrays with additional index check,
  • array_uintersect_uassoc – It finds the intersection of arrays with additional index check, compares data and indexes by a callback functions
  • array_uintersect – It finds the intersection of arrays, compares data by a callback function
  • array_unique – It removes duplicate values from an array
  • array_unshift – It prepend one or more elements to the beginning of an array
  • array_values – It return all the values of an array
  • array_walk_recursive – It applay a user function recursively to every member of an array
  • array_walk – It apply a user function to every member of an array
  • array – It can be used to create an array
  • arsort – It sort an array in reverse order and maintain index association
  • asort – It sort an array and maintain index association
  • compact – it create array containing variables and their values
  • count – It Count all elements in an array
  • current – It returns the current element in an array
  • each – It return the current key and value pair from an array
  • end – It sets the internal pointer of an array to its last element
  • extract – It import variables into the current symbol table from an array
  • in_array It checks if a value exists in an array
  • key – It fetches a key from an array
  • krsort – It sorts an array by key in reverse order
  • ksort – It sorts an array by key
  • list – It assigns variables as if they were an array
  • natcasesort – It sorts an array using a case insensitive “natural order” algorithm
  • natsort – It sorts an array using a “natural order” algorithm
  • next – It moves the internal array pointer of an array
  • pos – It is an alias of current()
  • prev – It rewinds the internal array pointer
  • range – It can be used to create an array containing a range of elements
  • reset – it  set the internal pointer of an array to its first element
  • rsort – It  sorts the array in reverse order
  • shuffle – It shuffles the array
  • sizeof – It an alias of count()
  • sort – It sorts the array
  • uasort – It sorts an array with a user-defined comparison function and maintain index association
  • uksort – It sorts an array by keys using a user-defined comparison function
  • usort – It sorts an array by keys using a user-defined comparison function