Get Random Record From List In Coldfusion
<cfset ColorList="#999999,#FF0F00,#FF6600,#FF9E01,
#FCD202,#F8FF01,#B0DE09,#04D215,#0D8ECF,#0D52D1,
#2A0CD0,#8A0CCF,#CD0D74,#754DEB,#DDDDDD,#333333">
<cfset randIndex = RandRange(1,listlen(ColorList))>
<cfoutput>
#ListGetAt(ColorList,randIndex,',')#
</cfoutput>
Comments
Post a Comment