CFML Functions

array Category functions

Function Name Description
ArrayAppend Adds a new element to the end of the array, or if an XML object, adds a new child element.
ArrayAvg Determines the average value of the array of numbers. Errors if any element is a non-numeric
ArrayClear Removes all the elements of this array, or if an XML object all the child
ArrayConcat Appends all the elements from array2 into array1; supports binary objects
ArrayContains Determines if the search element is within this array
ArrayContainsnocase Determines if the search element is within this array, using case insensitive matching for strings
ArrayDeleteat Removes an element of this array at the given index. Throws exception is out of bounds
ArrayEach Applies the function to each of the elements in the array
ArrayFilter Used to loop over the array to create a new array based on the inner function applied to each element that will return true/false if it is to be included
ArrayFind Returns the numeric of where the given element is within the array, or return 0 if not found
ArrayFindall Used to loop over the array, returning an array of indices of the elements where the function that was called returned true
ArrayFindnocase Returns the numeric of where the given element is within the array, or return 0 if not found, using case insensitive matching for strings
ArrayFirst Returns the first element of an array
ArrayGet Returns the element at the position given; if a binary object returns the byte at the position.
ArrayIndexexists Determines if the index exists within the array or binary object
ArrayInsertat Adds an element to this array/xml object at the given index. Throws exception is out of bounds
ArrayIsdefined Determines if the value at the given index has been assigned
ArrayIsempty Determines if the array or xml object is empty of all elements
ArrayLast Returns the last element of an array
ArrayLen Returns the length of the array
ArrayMax Returns the maximum value represented in the array
ArrayMin Returns the minimum value represented in the array
ArrayNew Creates a new array of specific dimension
ArrayPrepend Inserts the given data at the start of the array or XML object
ArrayResize Grows the size of the array to the value givens
ArrayRest Returns a new array, minus the first element
ArrayReverse Returns a new array, with all the elements reversed
ArraySet Sets the range of elements to the value given
ArraySlice Returns a new array, from the start position up to the count of elements
ArraySort Reorders the elements in the array according to the sort type and direction
ArraySum Adds up all the values in the array and returns the sum
ArraySwap Swaps the elements around at the given index position
ArrayTolist Transform the array to a list of elements delimiter by the given string
ArrayTrim Resizes the array down to the size given, removing the extra elements from the end
ArrayTrimvalue Runs through the array and trims the whitespace away from each of the elements
ArrayValuecount Returns the number of times the search element occurs in the array, or return 0 if not found
ArrayValuecountnocase Returns the number of times the search element occurs in the array, or return 0 if not found (case in-sensitive matching)
Datasourceactivepoolstats Returns back an array of structs that represent all the active datasource's in the pool complete with their stats.
Newarray Creates a new array of specific dimension