am i dreaming, or can you you use structFindValue().
i think u have to add your array to a struct first tho

in such:
something = structNew()
something.yourarray = yourarray
structfindValue(something, thevalue, "all")

i'm sure i've done that before. check out the docs.
G


> >>On 6/3/05, Chad Renando <[EMAIL PROTECTED]> wrote:
> >>
> >>>'morning all.
> >>>
> >>>What would be the best way to find a particular value in an array?
> >>>Ideally, I would like to query my array to get a certain value where a
> >>>condition is true, sort of like
> >>>
> >>>SELECT MyArray[1][5]
> >>>FROM MyArray
> >>>WHERE MyArray[1][2] = "Something"
> >>>
> >>>The altrnative is to loop through the array and grab the value on the
> >>>way through, but I am thinking I will take a performance hit,
> >>>particularly as I am doing this within a loop already...
> >>>
> >>><cfloop index="i" from="1" to="#ArrayLen(MyArray)#">
> >>>     <cfif MyArray[1][2] = "Something"><cfset MyValue=1></cfif>
> >>></cfloop>
> >>>
> >>>Cheers,
> >>>
> >>>Chad
> >>>who uses band names like Rammstein in general conversation 'cause it
> >>>just sounds cool
> >>
> >>--
> >>E: [EMAIL PROTECTED]
> >>W: www.compoundtheory.com
> >>ICQ: 3094740
> >>
> >>---
> >>You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> >>To unsubscribe send a blank email to [EMAIL PROTECTED]
> >>Aussie Macromedia Developers: http://lists.daemon.com.au/
> >>
> >
> >
> >
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to