The "array_find_index" Function
#
SyntaxArgument | Type | Description |
---|---|---|
id | array | The index of a previously-created array to search |
val | any | The value to search for |
#
DescriptionSearches an array for a value and returns the index, if found, or -1
if the value does not exist in the array. If the input is not an array, but happens to match the search value regardless, 0
will be returned instead.
To search a multidimensional array, input any parent arrays before the child array to be searched, e.g. my_array[0][0]
.