Advertisement
RobGcf

ArrayOfStructsValue

Oct 22nd, 2014
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <cffunction name="ArrayOfStructsValue" returntype="boolean">
  2.     <cfargument name="arr" type="any" required="true">
  3.     <cfargument name="key" type="any" required="true">
  4.     <cfargument name="value" type="any" required="true">
  5.  
  6.     <cfset var pass = 0>
  7.  
  8.     <cfloop index="a" from="1" to="#ArrayLen(arguments.arr)#">
  9.         <cfif arguments.arr[a][arguments.key] eq arguments.value>
  10.             <cfset pass = 1>
  11.             <cfbreak>
  12.         </cfif>
  13.     </cfloop>
  14.  
  15.     <cfreturn pass>
  16.  
  17. </cffunction>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement