A common function on many php (or other data driven) sites is to loop through an array and write the contents of the array to the page. It is preferable to spread your data over multiple columns instead of writing it all in a straight list thus forcing your readers to scroll forever. Here is an easy way to dynamically write your cells and rows using expressions.
" . $names[$counter] . " ";
//this is the key - if field has no remainder then field is in second column
$newrow=($counter % 3);
if ($newrow == 2) echo "
} // end of while
//****This will write the data in three cells per row. To only do two cells
//** per row change the 3 in the $newrow definition to a 2 and the
//** comparison to a 1.