You don't necessarily need them in an array to do this. You can get at the
data with your chosen index like so:
<cfoutput>
#yourQuery["name"][yourRandomNumber]#
</cfoutput>
Adrian
-----Original Message-----
From: Melissa Cope [mailto:[EMAIL PROTECTED]
Sent: 23 July 2008 15:06
To: CF-Talk
Subject: Directory contents to list/array?
Here's the story: We have about 20 logos. We want a random four displayed.
In and of itself this is not very complicated, but a third party wants to
add and delete logos from the pool.
It seems to me that the easiest way to do this (once we put in a self-admin
section to upload/delete logos) would be to input the contents of the logo
directory into an array, then use randrange to choose positions in the array
(along with a listfind loop to make sure there aren't duplicates). My
problem is that I can't figure out how to transfer the cfdirectory results
to an array. Could you point me in the right direction? Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309524
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4