Javascript string manipulation, combining numbers with strings
<p>I am trying to get values from a data set. My function has to loop from 1 to 7
to get my opening hours for 7 days. what i need to do is:</p>

<p>Where openHours[i] the "i" stands for a number between 1 and 7. I would like to attach that number on the word "openHours" in order to create a new word ex. "openHours1"</p>

<p>What would be the best way to do that? The "alert(i);" is working fine and is generating numbers from 1 to 7. I just need to attach those numbers on the string.</p>

<p>So far i tried everything that can comes in my head but I don't use javascript often so i am kind of stuck. </p>

<p>Thanks for the help.</p>

<pre><code>function hoursFunction()
{  
var i =0;
alert("Hello");
for(i=1;i&lt;8;i++)
{
    alert(i);
    alert(hoursForm.openHours[i].value);
}

}
</code></pre>
