Originally posted by John Schretz: this is what i ultimatly want to accomplish
What is "this"? It's not going to be inferred by looking at code.
If what you are trying to do is to iterate over 40 items in order to put them into a 4 column table, do the math to figure out how many rows you need. Fiddling with the counter is unlikely to get you anywhere, and will just likely have bizarre side effects.