Este es el codigo que uso, asi entenderan cuando digo que estoy creando dos tablas con distintos fondos, pero que al momento de hacer eso lo que me hace es dar dos tabals con distintos fondos y mismo resultado.
Código PHP:
$query = mysql_query("SELECT * FROM tabla ORDER BY id DESC LIMIT 5");
while($query2 = mysql_fetch_array($query)){
echo'<table border="0" cellpadding="0" cellspacing="0" width="223" height="1" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt;"> <tr><td width="6" height="1" background="http://www.forosdelweb.com/images/article_left.gif"></td><td width="211" height="1" background="http://www.forosdelweb.com/images/article_bg.gif">';
echo '<a href="">'.$query2[titulo].'</a><br>'.$query2[fecha].'</font></td><td width="6" height="1" background="http://www.forosdelweb.com/images/article_right.gif"> </td></tr></table>';
echo'<table border="0" cellpadding="0" cellspacing="0" width="223" height="1" style="border-collapse: collapse; font-family: Verdana; font-size: 8pt;"> <tr>
<td width="6" height="1" background="http://www.forosdelweb.com/images/article_left2.gif"></td>
<td width="211" height="1" background="http://www.forosdelweb.com/images/article_bg2.gif">';
echo '<a href="">'.$query2[titulo].'</a><br>'.$query2[fecha].'</font></td>
<td width="6" height="1" background="http://www.forosdelweb.com/images/article_right2.gif"> </td>
</tr>
</table>';
}
Como pueden ver en la primera la tabla tiene el bg y en la segunda el bg2 ya que quiero que la primera salida de la db sea en la tabla 1 y la segunda en la 2, la 3 en la 1 y la cuarta en la tabla 2.
A ver si con esto me explico mejor.
Gracias.