Cambia las variables y listo
Código PHP:
Ver original<?php
require "conecta.php";
$anhos="SELECT * FROM noticia GROUP BY year ORDER BY year DESC";
echo "<table border='1'>";
{
echo "<tr><td colspan='4'>Registros del ".$extrae1["year"]."</td></tr>";
$registros="SELECT * FROM noticia WHERE year = ".$extrae1["year"]." ORDER BY year DESC";
{
echo "<tr>";
echo "<td>".$extrae2['id']."</td>";
echo "<td>".$extrae2['year']."</td>";
echo "<td>".$extrae2['titulo']."</td>";
echo "<td><a href='codigo?id=".$extrae2['id']."'.php><u>Ver</u></a></td>";
echo "</tr>";
}
}
echo "</table><br>";
?>