Well, you can set up a loop that will execute like so:
make a query,
define a loop that will break teh query apart, inside that loop make a loop that will take those current marks and place them in an array:
$query=mysql_result("select.....");
$howmany=mysql_num_rows($query);
$sections=$howmany / 20;
if ($sections > 0){
for ($a=0; $a<$sections; $a++){
for ($b=0; $b<20; $b++);
if (isset($start)) $row=$start+1;
else $row=0;
if (!isset($start)) { $start=($a * 20);
$input=mysql_result($query, $row, 'field');
$array[$a][$b]=$input; }
}}
try that otu, or you can do $array.$a[$b]=$input;
I dont knwo if the code wil work, but it shoudl give you and idea.