( "SELECT * FROM my WHERE gorod='$gorod' ");
$gorod = 'Moscow';
$query = "SELECT * FROM my WHERE gorod LIKE ?";
// get DB data using PDO
$stmt = $pdo->prepare($query);
$filter = "%$gorod%";
$stmt->execute([$filter]);
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
print_r($rows);