You can save the data in form like
{
"0": [5,4,8],
"1": [2,3],
..
}
where object key refer to row index, and array values refer to index of checked column, you can easily generate this object in javascript by looping through each 'ul' element saving it's index as row index then get index of 'li' element that's checked & push it in array.
Then you serialize it back to server as json, save that json in DB.
Getting it back in php, you will loop through each row printing 'ul' element , then loop to print 'li' element, ex:
for ($i=0; $i < count($data); $i++) {
echo '<ul>';
//printing 18 column as u have in image
for ($j=0; $j < 18; $j++) {
if ( in_array($j, $data[$i]) ) {
echo '<li>CHECKED</li>';
}else{
echo '<li></li>';
}
}
echo '</ul>';
}
i think that's better than having table in db for each table u have.
finally providing context will greatly help in making a better answer, for ex: how table is generated , it's use, ...