Using counter as part of form names

I have 2 questons.

  1. Is there a way for the loop counter to loop while less then [a php variable]?
  2. Is there a way to use a counter in the name of the form elements? Example, instead of “switchBox1” use: “switchBoxCounter”
    instead of “nameaddy1” use: “nameaddyCounter”

  { = "#E5E5E5";
  { = "#FFFFFF";