How about:

<cfset list="John,Paul,Ringo,George">
<cfoutput>#getToken( list,randrange(1,listlen(list)),',' )#</cfoutput>


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:coldfusion.developer@;att.net]
Sent: Friday, November 15, 2002 11:19 AM
To: CF-Talk
Subject: Ramdomizing elements in a LIST


I'm trying to randomize the output of a list within a CFLOOP.  Any help
would
be great.  Her's what I have so far.

<cfloop INDEX="ListElement" LIST="John,Paul,Ringo,George">

<CFOUTPUT>#ListElement#</CFOUTPUT><BR>
</cfloop>

D

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to