<cfset myArray = listtoarray("item1,item2,item3")>

You can of course use | or some other character to delimit the list if
you need a comma in an item in your array.

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1

> Currently, I only know one way of initializing an array,
> but it seems
> kinda silly and inefficient.

> <cfset deptArray=arrayNew(1)>
> <cfset deptArray[1]="Family Studies">
> <cfset deptArray[2]="Kinesiology">
> <cfset deptArray[3]="Public and Community Health">

> In Actionscript, I can do myArray=newArray("Family
> Studies",
> "Kinesiology", "Public and Community Health"), which is
> alot more
> efficient (in number of lines).

> I now have to do an array which more than 100 entries and
> I don't
> want 100 lines to initialize it.  Is there a better way to
> do this in
> Cold Fusion?  I'm creating this to loop through it's
> entries.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to