I am creating a system that returns me from the database several dates, but I would like only one of each without the repetitions, I already tried with array_unique, but without success, I think it must be because my research returns in OBJ association, if anyone can give me a suggestion I would be grateful.
$ sql_historico="SELECT * FROM historico WHERE id_condominio=". $ id_condominio; $ historico = $ PDO-> prepare ($ sql_historico);
$historico->execute();
if($historico->rowCount()>0){
while($valor_historico = $historico->fetch(PDO::FETCH_OBJ)){
$historico_data = $valor_historico->data;
} }