<?php 
//                                           USERNAME,  password
//$pdo = new PDO("mysql:host=localhost", "phpmyadmin", "server");
$pdo = new PDO("mysql:host=localhost;dbname=person","phpmyadmin","server");


$selectAll= 'SELECT * FROM schueler;';

$allValues = $pdo->query($selectAll);
// $query -> gibt was aus
// $exec -> gibt nix aus 

echo "<pre>";
 print_r($allValues->fetchAll());
 echo "</pre>";
echo 'Alle einträge:  <br>';

foreach($allValues as $value){
    echo $value["id"]."|".$value['frstName']."|".$value['lastName']."<br>";
}

?>