$sql = 'SELECT serviceType, price FROM services';
$result = $pdo->query($sql);
while($row = $result->fetch(PDO::FETCH_ASSOC)) {
foreach($row as $key => $value) {
echo "" . htmlspecialchars($value, ENT_QUOTES, 'UTF-8'). "";
}
}
По умолчанию обычно FETCH_BOTH