opentable("Weekly Winners - 2012");
echo '<table align="center" cellspacing="1" cellpadding="1" width="100%" class="tbl-border">
<tr class="tbl2">
<th bgcolor="#000066" colspan="3"><font color="#ffffff">Regular Spreads Pool</font></th>
<th bgcolor="#000066" colspan="3"><font color="#ffffff">Confidence Point Pool </font></th>
</tr><tr class="tbl2">
<td><b><center>Week </b></td>
<td><b><center>Name</b></td>
<td><b><center>Won</b></td>
<td><b><center>Week </b></td>
<td><b><center>Name</b></td>
<td><b><center>Points</b></td>
</tr>';
$sql = dbquery("SELECT * FROM fusion_regwkwnrs ORDER BY regwk_id LIMIT 0,17");
$sqlcpp = dbquery("SELECT * FROM fusion_cppwkwnrs ORDER BY cppwk_id LIMIT 0,17");
while($data = dbarray($sql)) {
while($datacpp = dbarray($sqlcpp)) {
echo '<tr class="tbl1">
<td>'.$data['regwk_id'].'</td>
<td>'.$data['name'].'</td>
<td align='center'>'.$data['wins'].'</td>
<td>'.$datacpp['cppwk_id'].'</td>
<td>'.$datacpp['name'].'</td>
<td align='center'>'.$datacpp['points'].'</td>
</tr>';
}
}
echo '</table>';
closetable();
Inbetween your <td> tags you had random | characters, and when there is text outside tags, but inside <table> tags, example:
<table>
<tr>
<td>Hello</td> Random Text
<td>World</td>
</tr>
</table>
The text is displayed outside the table and it's an eyesore. The repeat of data in the first table is most likely a database side issue. Go into MyPhpAdmin and make sure your data is correct. I can't determine much based on your code with no knowledge of your database side.
The way I formatted your code is how you should always do it. Displays the code neatly in tiers, going by tables, while statements, and all. I would also separate what you have into two completely separate tables and avoid the double while statements, but that's my personal preference.
Keep at it!
~ Digital
|