LISTCONTAINS

I l @ ve RuBoard

Used to determine whether or not a certain value is contained within a list. The function returns the index, or position in the list, of the first item that matched what you are looking for. If no matches are found, the function returns 0 (zero).

Syntax

 ListContains(list, value_to_find, comma character (,) used as delimiter) 

Parameters

ListContains requires a list, the value you're looking for within that list, and the delimiter for the list. A comma is the default delimiter.

Example

 <!--- check to see if a state value is within a list --->  <cfif ListContains(states, "MI") NEQ 0>   Michigan is in the list <cfelse>   Michigan is not in the list </cfif> 
I l @ ve RuBoard


Macromedia ColdFusion 5. Training from the Source
Macromedia ColdFusion 5 Training from the Source (With CD-ROM)
ISBN: 0201758474
EAN: 2147483647
Year: 2002
Pages: 99
Authors: Kevin Schmidt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net