Question to implement PHP

Alt Text

How can this be implemented? Color is not required.
There is already a base with appreciation students. I just can not understand how to draw an assessment in this date. Help please.


Answer 1, Authority 100%

First form an array with dates ($ Dates).
Then form another array:

$users[''][''] = ;

then form a table:

$t = '<table>';
$t .= '<tr>';
$t .= '<td>&nbsp;</td>';
foreach($dates as $date){
    $t .= '<td>'.$date.'</td>';
}
$t .= '</tr>';
foreach($users as $fio => $null) {
    $t .= '<tr>';
    $t .= '<td>'.$fio.'</td>';
    foreach($dates as $date) {
        $t .= '<td>';
        $t .= !empty($users[$fio][$date]) ? $users[$fio][$date] : '&nbsp;';
        $t .= '</td>';
    }
    $t .= '</tr>';
}
$t .= '</table>';
echo $t;

something like this.