This isn't that difficult, just name all of your duplicated fields as arrays (i.e hwkset[]) but instead of leaving the [] empty put in a number that way all you need to do is walk over the index and us an isset() test to see if the field was set or not.
So all you'd do with the data was go through 1 loop.
for ($i = 1; $i <= 10; $i++) {
if isset($year[$i]) { //do something with the year}
else { // use a default }
if isset($subject[$i]) {}
else {}
if isset($staff[$i]) {}
else {}
if isset($date[$i]) {}
else {}
if isset($hwkset[$i]) {}
else {}
}
Something like that. Ofcourse if staff is the same for the whole page then you should have it entered in it's own section and not with the duplicated data.