at first you should not check the result of query by checking it with empty function
even queries that have not any record has an instance of PDOStatements class on their return so even if your query result is empty, by checking the query variable you can't specific that query has any record or not
for checking that your query has any record the best way is using rowCount that show you the count of your query result rows count. so check it that rowCount is more than 0 or not.
<?php
// query
$cek = $db->prepare('SELECT * FROM `anket` ORDER BY `cevap_id` DESC');
$cek->execute();
// checking query has any record or not
if($cek->rowCount() < 1){
print 'no record found!';
}else{
// your process
}
and at last for saving a column values in an array, you should create it and in loops put your column value of each row in every loop iterates
<?php
// query
$cek = $db->prepare('SELECT * FROM `anket` ORDER BY `cevap_id` DESC');
$cek->execute();
// checking query has any record or not
if($cek->rowCount() < 1){
print 'no record found!';
}else{
// your array
$php_framework = [];
// your process
while($row = $cek->fetch(PDO::FETCH_ASSOC)){
$php_framework[] = $row['amirali']; // put your column name instead of "amirali"
}
print_r($php_framework);
// or
var_dump($php_framework);
}