ArrayFind()
These functions searches the array for the specified object.
ArrayFind( array=array, value_or_closure=any );
Returns: Number
Examples
Find first occurrence of string in array
fruitArray = ['apple', 'kiwi', 'banana', 'orange', 'mango', 'kiwi'];
favoriteFruits = arrayFind(fruitArray,'kiwi');
dump(favoriteFruits); //2
See also
- Arrays
- Collections
- array.find()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)