<head>
<meta charset="utf-8">
<style type="text/css">
body {background-color:#0049AF; font-size:1.2em; padding:10px; font-family:Arial,Helvetica,sans-serif; color:#000;}
a {font-family:Arial,Helvetica,sans-serif; color:#0000FF; text-decoration: none;}
div.all{ width:80%; background-color:#C6C6CE; margin:0px; padding-top:5px; padding-left:5px; padding-right:5px; padding-bottom:5px; }
table { border-spacing:10; border-collapse: separate; width:100%; }
td.hell {background-color:#D5E4E6; color:#000; padding-top:5px; padding-left:5px; padding-bottom:5px; padding-right:10px; text-align: right; }
td.dunkel {background-color:#fff; color:#000; padding-top:5px; padding-left:5px; padding-bottom:5px; padding-right:10px; text-align: right; }
td.hellr {background-color:#D5E4E6; color:#000; padding-top:5px; padding-left:5px; padding-bottom:5px; padding-right:1px; text-align: left; }
td.dunkelr {background-color:#fff; color:#000; padding-top:5px; padding-left:5px; padding-bottom:5px; padding-right:1px; text-align: left; }
</style>
</head>
<body>
<?php
$spieler = array(
'1' => array('Nachname' => 'Baier',
'Vorname' => 'Michael',
'Strasse' => '',
'Hausnummer' => '',
'PLZ' => '',
'Ort' => '',
'Telefon' => '0162 - 67 20 91 2',
'Email' => '',
'spielt' => 'spielt',
'WApp' => 'WApp'),
'2' => array('Nachname' => 'Behrens',
'Vorname' => 'Markus',
'Strasse' => '',
'Hausnummer' => '',
'PLZ' => '',
'Ort' => '',
'Telefon' => '0172 - 48 78 26 0',
'Email' => '',
'spielt' => 'spielt',
'WApp' => ''),
'3' => array('Nachname' => 'Berg',
'Vorname' => 'Harald',
'Strasse' => 'Gartenstraße',
'Hausnummer' => '8',
'PLZ' => '31582',
'Ort' => 'Nienburg',
'Telefon' => '0176 - 96 47 49 37',
'Email' => 'bergfcnienburg@online.de',
'spielt' => 'spielt',
'WApp' => 'WApp'));
echo "<div class='all'>";
echo "<table>";
echo "<tr>
<th>Spieler</th>
<th>Nachname</th>
<th>Vorname</th>
<th>Straße</th>
<th>Nr.</th>
<th>PLZ</th>
<th>Ort</th>
<th>Telefon</th>
<th>Email</th>
<th>spielt</th>
<th>WApp</th></tr>";
foreach ($spieler as $type => $properties)
{
if($type%2==0)
{
echo "<tr><td class='hell'>$type</td>";
foreach ($properties as $property => $value)
{
echo "<td class='hellr'>$value</td>";
}
echo "</tr>";
}
if($type%2==1)
{
echo "<tr><td class='dunkel'>$type</td>";
foreach ($properties as $property => $value)
{
echo "<td class='dunkelr'>$value</td>";
}
echo "</tr>";
}
}
echo "</table>";
echo "</div>";
?>
| Spieler | Nachname | Vorname | Straße | Nr. | PLZ | Ort | Telefon | spielt | WApp | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Baier | Michael | 0162 - 67 20 91 2 | spielt | WApp | |||||
| 2 | Behrens | Markus | 0172 - 48 78 26 0 | spielt | ||||||
| 3 | Berg | Harald | Gartenstraße | 8 | 31582 | Nienburg | 0176 - 96 47 49 37 | bergfcnienburg@online.de | spielt | WApp |