Loop over the array and find the position,
i.e.
found = 0;
for ( i = 1; i LTE arrayLen( stBooks ); i = i + 1
)
{
if ( stBooks[ i ] IS 'DEF' ) // Or use compare()
if you are after a case match
{
found = i;
break;
}
}
Kind
regards,
Taco Fleur - Chief Executive Officer
Pacific
Fox http://www.pacificfox.com.au an
industry leader with commercial IT experience since 1994 …
-
Web Design and Development
-
SMS Solutions, including developer API
-
Domain Registration, .COM for as low as fifteen dollars a year, .COM.AU for fifty dollars two years!
-
BlackBerry® Business Solutions www.OzBlackBerry.com
-
We endorse PayPal, accept payments online now!
-
Seamless Merchant integration
---Having a stumpt moment, how to I find what position in the array 'DEF' is in?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Carl Vanderpal
Sent: Wednesday, 28 December 2005 4:59 PM
To: CFAussie Mailing List
Subject: [cfaussie] Find structure in array
Thanks
<cfscript>
aBooks = ArrayNew(1);
stBooks[1] = StructNew();
stBooks[1].Name = "ABC";
stBooks[1].Chapters = 50;
aBooks[2] = ArrayNew(1);
stBooks[2] = StructNew();
stBooks[2].Name = "DEF";
stBooks[2].Chapters = 40;
aBooks = ArrayNew(1);
stBooks[3] = StructNew();
stBooks[3].Name = "HIJ";
stBooks[3].Chapters = 27;
aBooks[4] = ArrayNew(1);
stBooks[4] = StructNew();
stBooks[4].Name = "KLM";
stBooks[4].Chapters = 36;
</cfscript>
====================================
Postal: Po Box 3462 Dural, NSW 2158
Email: mailto:[EMAIL PROTECTED]
FireFly Internet Phone: 80011777 --- 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/
