JavaScript using an array to display data
<p>I'm working on a score system that shows per question block, I'm using PHP to retrieve the data from a table and the javascript below to calculate the score. The problem is I want several score labels underneath each question block. So clearly I need an array to make this work, but currently I'm using this line to write the data onto <code>document.getElementById("score_label[0]").innerHTML=""+current_score.toFixed(1);</code>
so this only applies to the first entry in the array. How do I make it loop through the entire array(score_label[]) and increase it's value so the code reads <code>document.getElementById("score_label[0]").innerHTML=""+current_score.toFixed(1);
    document.getElementById("score_label[1]").innerHTML=""+current_score.toFixed(1);</code> </p>

<p>this is the element javascript is writing to <br />
<code>echo "your total score: &lt;span id='score_label[0]' name='score_board['".$score_board."']'&gt;&lt;/span&gt;";</code>
<br />if there is need for I can post the entire function but I think it's mostly my lack of knowledge on arrays that's the issue here</p>
