ArrayFirst()
Returns the first item from an array. Throws an error if the array is empty.
ArrayFirst( array=array );
Returns: any
Examples
aNames = array("Marcus","Sarah","Josefine");
dump( var=aNames, label="aNames - original array" );
dump(var=arrayFirst(aNames),label="first element of array aNames");
See also
- Arrays
- array.first()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)