<cfloop condition="listlen(mylist)">
<cfset target = randRange(1,listLen(myList))>
<cfoutput>#listGetAt(mylist,target)#<br></cfoutput>
<cfset myList = listDeleteAt(myList,target)>
</cfloop>
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
WWW : www.camdenfamily.com/morpheus
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:coldfusion.developer@;att.net]
> Sent: Friday, November 15, 2002 2:19 PM
> 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
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm