I added a class to the rows and use CSS to color the backgrounds. You could add a class for the TD tags as well and use CSS to set the font and color too.
Code:
<?php
$count = 1;
$input = 'https://www.fdic.gov/bank/individual/failed/banklist.csv';
echo "<html><body><table border=1 width=250>";
echo "<style>
tr.row:nth-child(odd) {
background: blue;
}
tr.row:nth-child(even) {
background: black;
}
</style>";
echo "<th bgcolor=#222937><FONT COLOR=WHITE FACE=Geneva, Arial SIZE=3>Bank Name</FONT></th>";
echo "<th bgcolor=#222937><FONT COLOR=WHITE FACE=Geneva, Arial SIZE=3>City</FONT></th>";
echo "<th bgcolor=#222937><FONT COLOR=WHITE FACE=Geneva, Arial SIZE=3>Acq. Institution</FONT></th>";
echo "<th bgcolor=#222937><FONT COLOR=WHITE FACE=Geneva, Arial SIZE=3>Closing Date</FONT></th>";
if (false !== ($ih = fopen($input, 'r')))
{
fgetcsv($ih);
while (false !== ($data = fgetcsv($ih)))
{
$outputData = array($data[0], $data[1], $data[4], $data[5]);
echo "<tr class=row >";
foreach ($outputData as $row)
{
echo "<td ><FONT COLOR=D3AB04 FACE=Geneva, Arial SIZE=2>" . htmlspecialchars($row) . "</FONT></td>";
$count++;
}
}
fclose($ih);
echo "</table></body></html>";
}
?>