Link to home
Start Free TrialLog in
Avatar of izweig
izweig

asked on

Saving an array to a string? ColdFusion.

I am wondering if this is possible?
I would like to query a db:
Select color,car,age

FROM this table

color            car              age
blue           family             1
green         sport               2
red             van                 3



I want to output the results of the query as:
<cfset string="[blue,family,1] , [green,sport,2] , [red.van,3]">


 is this possible?

I have tried many ways, all are either outputting only a single row,  or trying to use ValueList()  i am returning :
 [blue,red,green] [family, sport,van] [1,2,3]...

Thanks!!!
ASKER CERTIFIED SOLUTION
Avatar of gdemaria
gdemaria
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of izweig
izweig

ASKER

Thank you, exactly what I was looking for! Soo easy when you know how!