$arr = array();
$query = $dbh->query('SELECT .......', PDO::FETCH_ASSOC);
foreach($query as $q){
if (in_array($q['id'], $arr)) continue;
echo $q['sütun'];
array_push($arr, $q['id']);
}
?>
$arr = array();
$query = $dbh->query('SELECT .......', PDO::FETCH_ASSOC);
foreach($query as $q){
if (in_array($q['id'], $arr)) continue;
echo $q['sütun'];
array_push($arr, $q['id']);
}
?>