Código PHP:
$sql="select id_noticia,titulo,bajada,id_categoria from noticia where fecha='$fecha_' and destacado='no' order by id_categoria";
$que="";
$resultado=mysql_query($sql,$link);
echo mysql_error();
while ($rowa=mysql_fetch_array($resultado))
{
if ($que!=$rowa['id_categoria'])
{
$que=$rowa['id_categoria'];
$sql__="select categoria from categoria where id_categoria='$que' order by categoria";
$resultado__=mysql_query($sql__,$link);
while ($rowa__=mysql_fetch_array($resultado__))
{
?>
<hr align="center" size=0 color="#FFFFFF" width="510" noshade>
<table width="510" align="center">
<tr><td align="center" bgcolor="#D6DEF5" class="listadolinks"><div align="left"></div> <?=$rowa__['categoria']?></td>
</tr></table>
<?
}
}
else
{
echo "<hr width=510 size=1 noshade>";
}
?>
<table width="510" align="center">
<tr>
<td height="20" align="left" valign="top" class="negro-bd-2">
<?=$rowa['titulo']?>
<br> </td>
<td width="120" rowspan="3" align="center">
<?
$sql_="select imagen from imagenes where id_noticia='{$rowa['id_noticia']}' limit 1";
$resultado_=mysql_query($sql_,$link);
while ($rowa_=mysql_fetch_array($resultado_))
{
$archivo="imagenes_noticia/";
$archivo.=$rowa_['imagen'];
if (is_file($archivo))
{
?>
<img src="imagenes_noticia/<?=$rowa_['imagen']?>" width="80" border="1">
<? } ?>
<? } ?>
</td>
</tr>
<tr>
<td height="43" align="left" valign="top" class="txt-noticias">
<?=$rowa['bajada']?>
<a href="noticia.php?id=<?=$rowa['id_noticia']?>" class="listadolinks Estilo1">> Ampliar</a></td>
</tr>
</table>
<?
}
?>
<hr align="center" size=0 color="#FFFFFF" width="510" noshade>
<p> </p>
<table width="510" border="0" align="center">
<tr>
<td bgcolor="#FF9900" class="listadolinks"><div align="center"> El Acontecer Diario - Durazno, Uruguay - Artigas 374- Telefax: +598 362 4416- Realización Diez </div></td>
</tr>
</table> </td>
<td valign="top" bgcolor="#E9E9E9"><img src="ultimo.jpg" width="115" height="20"> <p align="center"> <img src="cotizatiempo.jpg" width="108" height="200"></td>
</tr>
</table>
</table>
</body>
</html>