<? 
include("functions.php");

$doublettes = checkdoublettes();

$even = true;
for ($i = 0; $i < count($doublettes); $i+=2) {
    print $i . ": "; printRow($doublettes[$i]);
    print $i . ": "; printRow($doublettes[$i+1]);
}

function printRow($row)
{
    $userId = $row['userId'];
    $name = $row['name'];
    $vorname = $row['vorname'];
    $ort = $row['ort'];
    $versnummer = $row['versnummer'];

    print "$userId, $name, $vorname, $ort, $versnummer\n";
}
?>
