表月度排名

Do you have any suggestions/tips on how can I achieve this table layout in dompdf? Retrieving of the data from database are all working fine my problem is how can I achieve my required table layout.

here is my table output sample: enter image description here

Here's what I have/tried so far:

<table class="ORMExSum2" cellpadding="0" cellspacing="0" border="1" width="100%">
    <thead>
      <tr><th colspan="14">Monthly Rankings</th></tr>
      <tr>
      <th width="10%">Location</th>
      <th width="22.5%">Negative Snippet</th>
        <?php  
            $year = (date('Y')-1);
            $curyear = date('Y');
            $start = new DateTime("Dec 1, $year");
            $end = new DateTime("Dec 31, $curyear");

            $interval = DateInterval::createFromDateString('fourth friday of next month');
            $period = new DatePeriod($start, $interval, $end, DatePeriod::EXCLUDE_START_DATE);

            foreach ($period as $p) { ?>
                <th width="5.63%"><?php echo $p->format("M d"), "
";?> </th>
         <?php  }
        $mrw1++;
        ?>
      </tr>
     </thead>
     <tbody> 
      <?php $y='a';while($mrw2<$rsummary2): $mrw3 = 0;?>
      <tr>
      <td rowspan="<?php echo $cnt2[$y]+1;$y++;?>">
      <?php echo mysql_result($summary2,$mrw2,"Location");  ?>
      </td>
      <?php for ($i=0; $i < 14; $i++): ?>
      <td></td>
      <?php $cnt++; endfor;?>
      </tr>

        <?php while($mrw3<$rsnippet2): $mrw4 = 0;?>

          <?php if(mysql_result($snippet2,$mrw3,"SummaryID") == mysql_result($summary2,$mrw2,"LocationID")): ?>
            <tr>
            <td style="font-size:11px;">
            <?php echo mysql_result($snippet2,$mrw3,"NegativeSnippet"); ?>
            </td>
          <?php endif;?>
          </tr>
        <?php $mrw3++; endwhile; ?>
        <?php $mrw2++; endwhile; ?>
    </tbody>
  </table>

Thanks in advance for any help. I need it badly.