ray has an excellent point.  however, why not exploit the nature of arrays?
if you make Application.Sm an array with three elements, each one the arrays
sm1..3, then you can reference an element in SM(n) by
Application.SM[n][element].  you don't have to futz with string evaluation
at all.

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Steve Vosloo [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 28, 2001 8:41 AM
To: CF-Talk
Subject: Referencing an array item


I have 3 arrays, which are assigned to the application scope:

<cfset Application.SM1 = SM1>
<cfset Application.SM2 = SM2>
<cfset Application.SM3 = SM3>

My custom tag receives a number (1,2 or 3), and with that I reference the
correct array. I need to dynamically use this number to reference the
correct array, e.g.

#ArrayLen(application.SM & attributes.Num)#

(The above code does not work.) Any help would be much appreciated!! Thanks
in advance.

Steve


Development Manager
Vardus Internet Solutions (SA)

Tel: (+27) 21 670 9880
Fax: (+27) 21 674 4549

Email: [EMAIL PROTECTED]
Website: www.vardus.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to