PDA

View Full Version : Space between TR in php


marian26
05-12-2007, 10:31 AM
I have this table :

include 'dbconnect.php';
$query = 'SELECT * FROM news ORDER BY news_data DESC';
if ($r=mysql_query ($query)) {
echo '<table width="100%" border="1" cellspacing="0" cellpadding="0">';
while ($row=mysql_fetch_array ($r)) {
echo "<tr bgcolor=\"#D3DCE3\">
<td>&nbsp;</td>
<td align=\"center\"><strong>{$row['news_titlu']}</strong></td>
<td>&nbsp;</td>
</tr>
<tr bgcolor=\"#E5E5E5\">
<td colspan=\"3\">{$row['news_continut']}</td>
</tr>
<tr bgcolor=\"#D3DCE3\">
<td colspan=\"3\">&nbsp;</td>
</tr>";
}
echo'</table>';
}else{
die ('Nu am putut extrage informatia');
}
mysql_close();


I need some space between table rows . You can see in the atached picture . I've tried with \n but I think it's wrong .

matak
05-12-2007, 11:13 AM
i think that is a tr padding problem, which you solve with css, not with PHP...