2 Replies Latest reply on Mar 15, 2007 7:35 AM by Anthony Spears

    Setting variables in cfscript

    Anthony Spears Level 1
      I am parsing xml and I am trying to set each xml tag with the same name to a different variable. This is what I have.

      COVYEAR = XmlSearch(myxmldoc, "//COVERED/YR_INFO/YEAR");

      for (i = 1; i LTE ArrayLen(COVYEAR); i = i + 1)

      vCOVYEAR = COVYEAR .XmlAttributes["VALUE"];

      How do I add the "i" index to the variable vCOVYEAR so that each element in the array would be set to vCOVYEAR1, vCOVYEAR2, vCOVYEAR3, etc. etc.

      Thanks in advance.