<?php

include("list.php");

try {
    $pdo = new PDO ("mysql:dbhost=$dbhost;dbname=$dbname;charset=utf8", $dbuser, $dbpw);
} catch (PDOException $e) {
    die($e->getMessage());
}

$sql = "SELECT * FROM teilnehmer ORDER BY name";

if ($stmt=$pdo->query($sql)) {
    while ($zeile = $stmt->fetch(PDO::FETCH_NUM)) {
        echo "<pre>", print_r($zeile) ,"</pre>";
    }
}

?>