//PDO


$arananDeger = 5; //ornegin
$sorgu = $pdo->prepare("SELECT Kolon FROM Tablo");
$sorgu->execute();
$DBarray = $sorgu->fetchAll(PDO::FETCH_COLUMN);
foreach($DBarray as $biKolon)
{
if($biKolon==$arananDeger)
{
echo "Aranan deger bulundu."
}
}



//mysqli


$arananDeger = 5; //ornegin
$sorgu = $mysqli->prepare("SELECT Kolon FROM Tablo");
$sorgu ->execute();
$DBarray = [];
foreach ($sorgu ->get_result() as $row)
{
if($arananDeger == $row['column'])
{
echo "Aranan değer bulundu."
}
}