when you multiselect the values for a parameter, CR stores the selections in an array.
the code defines a counter(index) and a string to store the total of the sites selected by the user.
the [ i ] is the index of the array, so the output is yyy,xxx,zzz,
you then strip the last comma off of the string.
finally, if the first parameter is the asterick, forget about what was written into the string, just use the asterick.
display your results.
HTH
just because I am lazy, I will usually format a string like this as ,zzz,yyy,2ww
this way, when it is time to display, I just use mid(variable, 2).
Also, I would check if the first array member is *, if so, skip the loop all together. It probably won't save much processing time.
Edited by lockwelle - 15 Jan 2013 at 6:42am