TheConeHead
Programmer
How can I shorten this, the key is the expression and the colspans:
if (counter == 1) {
<td colspan="4"> </td>
} if (counter == 2) {
<td colspan="3"> </td>
} if (counter == 3) {
<td colspan="2"> </td>
} if (counter == 4) {
<td colspan="1"> </td>
}
if (counter == 1) {
<td colspan="4"> </td>
} if (counter == 2) {
<td colspan="3"> </td>
} if (counter == 3) {
<td colspan="2"> </td>
} if (counter == 4) {
<td colspan="1"> </td>
}