The order of a struct's elements is undefined. If you want an ordered collection, use an array. If you really need an ordered struct (I'm sure there's a legit reason somewhere), you'd have to make some kind of complex data type that combines a struct and an array.
Note that these two loops are equivalent: <cfloop collection="#myStruct#" item="i"> #myStruct[i]# </cfloop> <cfloop list="#structKeyList(myStruct)#" index="i"> #myStruct[i]# </cfloop> The latter can have a listSort wrapped around the structKeyList to sort the keys which may or may not solve your problem, depending on if the desired key order can be expressed with an alphabetic sort. cheers, barneyb On Thu, 10 Mar 2005 14:33:02 -0500, Damien McKenna <[EMAIL PROTECTED]> wrote: > I've got a structure like so: > > Events[] > "ARSG90IFNwcmluZ3M=7" > "MITGFtYXI=3" > "TXQXJsaW5ndG9u5" > > Yes, the elements are base64 encoded. > > Anyway, I do a dump of the structure before running it in cfloop and it > is in the correct order that I want. Then I run this: > > <cfloop collection="#Events#" item="EventID"> > stuff in here > </cfloop> > > However the cfloop query outputs the data in a different order, putting > the TX value first, then AR then MI. Is something going wrong or am I > missing a step? > > Thanks. > > -- > Damien McKenna - Web Developer - [EMAIL PROTECTED] -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198247 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

