php - Table Monthly Rankings -
do have suggestions/tips on how can achieve table layout in dompdf? retrieving of data database working fine problem how can achieve required table layout.
here table output sample:
here's have/tried 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 $p) { ?> <th width="5.63%"><?php echo $p->format("m d"), "\n";?> </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 ($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 help. need badly.
Comments
Post a Comment