<?php
$subdomain = explode('.', $_SERVER['HTTP_HOST'])[0];
$stmt = $pdo->prepare("SELECT * FROM cities WHERE city_short = '$subdomain'");
$stmt->execute();
while ($row = $stmt->fetch(PDO::FETCH_LAZY))
{
echo $row['city_full'];
}
?>