array

array:flip

Keys from array become values and values from array become keys.


array:get_first_key

Get first key of a given array


array:get_first_value

Get the first element of an array


array:get_head

Get first $n elements of a given array


array:get_key_by_index

Return a key by its numeric index in the array


array:get_key_by_value

Searches the array for a given value and returns the first corresponding key if successful. If the third parameter strict is set to TRUE then it will search for identical elements in the array.


array:get_keys

Return all the keys of the given array.


array:get_length

Get the number of elements in an array


array:get_tail

Get last $n elements of a given array


array:get_value_by_index

Return array value by index location


array:get_values

Get the values of a given array.


array:has_key?

Question whether given array has given key


array:has_value?

Question whether given array contains a given element


array:is_empty?

Question whether an array is empty or not.


array:is_multidimensional?

Question if given array contains one or more other arrays


array:join

Returns a string containing a string representation of all the array elements in the same order, with the $separator string between each element.


array:join_recursively

Join elements in a multi dimensional array


array:keep_keys

Keep any element from given array that its key is in the given list of keys


array:count

Count the number of values in an array


array:keep_value_if

Deletes every element of given array for which the given callback function evaluates to false.


array:keep_values

For the given array only keep elements that are in the list of given $values


array:get_last_key

Get last key of a given array


array:get_last_value

Get last element of a given array


array:map

Send each value of an array to a given function and replace it with the return value of that function.


array:merge

Merges the elements of one array with another.


array:remove_duplicate_values

Removes duplicate values from an array


array:remove_key_if

Pass each key to callback function and remove that element from the array if callback returns true.


array:remove_list_of_keys

Remove any element from given array that its key is in the given list of keys


array:remove_list_of_values

For the given array remove elements that are in the list of given $values


array:to_csv

Turn a multidimensional array into a CSV string. The column names are created using the key values of the array.


array:remove_slice

Remove a portion of the array and optionally replace it with something else


array:remove_value_if

Pass each value to callback function and remove that element from the array if callback returns true.


array:rest

Get elements starting at given index (default=1) to the end


array:reverse

Reverse the order of ginev array elements


array:search

Fuzzy search array values


array:shuffle

Shuffle the elements in a given array


array:slice

Extract a slice of the array


array:sort_keys

Sort array by keys in ascending (low to high) order


array:sort_values

Sort array by value in ascending order (low to high)


array:sort_values_reverse

Sort array by values in reverse order (high to low)


array:sum

Calculate the sum of values in a given array


array:get_random_keys

Get one or more random keys from an array


array:get_random_value

Return a random value inside given array


array:sort_by_function

Sort an array by a callback function that compares two values at a time and returns the sorted array.


array:prepend

Add one or more elements to the beginning of an array.


array:postpend

Add one or more elements to the end of an array.


array:difference

Get the difference between two arrays.


array:difference_by_key

Gets the difference between two array using their key for comparison calculation


array:get_highest_value

Get the highest value of an array


array:get_lowest_value

Get the lowest value of an array


Copyright © SunSed LLC 2013-2022 All rights reserved.