This is simply done like this
$hist=mysqli_query($db, "SELECT * from history");
$last_date="";
while($his=mysqli_fetch_assoc($hist)){
If($his['ano'] != $last_date){
echo $his['ano'];
$last_date = $his['ano'];
}
}
4
solved Check when a information provided from sql changes in php [closed]