How to creae multi table with particular records-urgent

hi frnds i need urgent solution

i have marks table .and 55 table records stored in that table. i need to print this records like 18 per one tables .i want to create tables runtime only..how to divide and how to create 18 records table as per total records.if any possible send me coding pls..i need to print 2 tables in single page.balance will display next pages