I have the following code below for an EthernetClient named client. It is supposed to print a 2 row, 9 column table. The headers are ID and Name and are the first cell in each row. The other columns are the associated data. The problem I am having is that it is only printing the first ID and then the rest of the cells for that row are blank. The names all get printed in the row below it without a problem. Why won't it print the other IDs?
Here is the ID array: String ids[16] = {"00000", "00001", "00010", "00011", "00100", "00101", "00110", "00111", "01000", "01001", "01010", "01011", "01100", "01101", "01110", "01111"};
client.println("<table cellpadding=5, border=1>");
client.println("<tr>");
client.println("<th>ID</th>");
for(int i = 0; i < 8; i++) {
client.print("<td>");
client.print(ids[i]);
client.println("</td>");
}
client.println("</tr>");
client.println("<tr>");
client.println("<th>Name</th>");
for(int i = 0; i < 8; i++) {
client.print("<td>");
client.print(name[i]);
client.println("</td>");
}
client.println("</tr>");
client.println("</table>");
clienttoSerialand the output looked OK. It even rendered OK in my web browser. – Nick Gammon Oct 04 '16 at 21:03