HTML page - iterate rows - first row repeats

HTML page - iterate rows - first row repeats

Hello all,

I've taken a Zoho example ( https://www.zoho.com/creator/help/views/create-html-page.html) to try to create a dashboard of my own. Starting simple so I understand the syntax (since I don't know HTML very well), I took a sample page (which works) and replaced hard-coded values with a "for each" loop. However, when I run it, the first row repeats for as many values in the table.

My pertinent code:
                        for each SP_row in SP
    {%>        <tr class="zc-viewrow zc-row-2">
                                <td><%=SP.Name%></td>
                                <td><%=SP.Email%></td>
                                <td><%=SP.Phone%></td>
                                <td><%=ctr%></td>
                            </tr>    <%ctr = ctr + 1;}%>    </tbody>

My output (I do have three different entries in the table):

Andrew noname@mail.com 800-555-1212 1
Andrew noname@mail.com 800-555-1212 2
Andrew noname@mail.com 800-555-1212 3

I added the "ctr" variable to see if it was actually iterating and, since I'm getting incremental numbers, I'd say it is.

Am I missing some special syntax like "go to next record" or something that obvious? I've stared at the sample app and don't see what's different.

Thanks in advance.

Mike