troubleshooting Question

ColdFusion Convert Query to an Array for Shuffle

Avatar of Albee_J
Albee_J asked on
ColdFusion Language
14 Comments1 Solution845 ViewsLast Modified:
Currently we have an array that spits out in a footer to shuffle our site sponsors

<cfset arrSponsors = ListToArray(
'<a href="">Clark Metal Products Co.</a>,
<a href="">General Sheet Metal Works Inc.</a>
<cfset CreateObject("java","java.util.Collections").Shuffle(arrSponsors)/>

    <cfloop array="#arrSponsors#" index="i">

If I want to replace the hard-coded list with a query  how do I get that to shuffle?

  <cfloop query = "getSupporters">
<dd><a href="#getSupporters.SiteSupportersURL#">#getSupporters.SiteSupportersName#</a></dd>
Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros