Save as team.php or whatever, and run in a browser. Should display the LFC team sheet, and help you out, too.
<?php
// alternating rows for dynamic output
// html header
echo '<html>
<head>
<title>Liverpool FC Team</title>
</head>
<body>
<h3>Liverpool FC Team</h3>
<table cellspacing="2" cellpadding="2">
<tr bgcolor="#bbbbbb">
<th>Number</th><th>Name</th>
</tr>';
// now the dynamic stuff
// $colours holds the two colours we wish to alternate
$colours = array('#cdcdcd', '#eeeeee' );
// array to display - start at 1
$lfc = array ( 1=> 'Dudek', 'Henchoz', 'Xavier',
'Hyypia', 'Baros', 'Babbel', 'Smicer', 'Heskey',
'Diouf', 'Owen', 'Murphy' );
// the meat of the script. you can use any of the methods
// above, too - just change the next few lines
$x = 0;
foreach ( $lfc as $num=>$name ) {
// use $x to set the background colour
echo "<tr bgcolor=\"". $colours[$x] ."\">
<td>$num</td>
<td>$name</td>
</tr>";
// set the colour for the next row
if ( $x == 1 ) {
$x = 0;
} else {
$x = 1;
}
}
// end of the page
echo '</table></body></html>';
?>