I hope I explain this properly...
I have an number of variables being passed to a CF page. These are named TITLE1 - TITLEx (x being the total number of variables being passed - this varies). An array is NOT being used, the values are all separate (this bit is out of my control). However, the value of x is passed to the next page.
I want to process these variables in a loop but am having trouble defining - or extracting each separate value.
For instance:
Lets say the value of x is 9. I have variables TITLE1 thru TITLE9 passed to the next page and I want to create a loop (ctr= 1 to x) and extract each value for processing or reassigment to another variable or array. I have tried the following:
<CFSET newvar = 'TITLE#ctr#'>
<CFSET newvar = '"TITLE"#ctr#'>
<CFSET newvar = 'TITLE & #ctr#'>
<CFSET newvar = '"TITLE" & #ctr#'>
and lots of others similar to no avail.
I hope this is clear and I am sure it is possible. All ideas greatly appreciated.
Beejay
I have an number of variables being passed to a CF page. These are named TITLE1 - TITLEx (x being the total number of variables being passed - this varies). An array is NOT being used, the values are all separate (this bit is out of my control). However, the value of x is passed to the next page.
I want to process these variables in a loop but am having trouble defining - or extracting each separate value.
For instance:
Lets say the value of x is 9. I have variables TITLE1 thru TITLE9 passed to the next page and I want to create a loop (ctr= 1 to x) and extract each value for processing or reassigment to another variable or array. I have tried the following:
<CFSET newvar = 'TITLE#ctr#'>
<CFSET newvar = '"TITLE"#ctr#'>
<CFSET newvar = 'TITLE & #ctr#'>
<CFSET newvar = '"TITLE" & #ctr#'>
and lots of others similar to no avail.
I hope this is clear and I am sure it is possible. All ideas greatly appreciated.
Beejay