How about!
I have a detail when presenting a query
This is my code where I consult and show the result:
$consulta_A = mysqli_query($con,"SELECT * FROM articulo8 WHERE fraccion = 'VI'AND inciso ='Inciso H' AND ano = '2017' ORDER BY mes DESC") or die("Error en consulta Agenda".mysqli_error($con));
while ($row = mysqli_fetch_array($consulta_A)) {
$documento = $row["documento"];
$mes = $row["mes"];
$ruta = $row["ruta"];
$departamento = $row["departamento"];
?>
<ul><?php echo $mes; ?>
<li><a href="<?php echo "plataforma/".$ruta.$documento; ?>" target="_blank"><?php echo $departamento; ?></a></li>
</ul>
The problem is that the result I get the month is repeated as many times as it exists in the database:
September
- LEGAL
October
- LEGAL
October
- TRANSPARENCY
May
- LEGAL
May
- TRANSPARENCY
and I need to show only the name of the month and all the documents within that month, like this:
September
- LEGAL
October
- LEGAL
- TRANSPARENCY
May
- LEGAL
- TRANSPARENCY
I hope and you can help me!