I'm trying to format a html table with a css stylesheet, unfortunately I'm not doing very well.. this is new ground to me.
Can any of the members assist and tell me where I'm going wrong?
Regards
Code: Select all
<html>
<head>
<title>A BASIC HTML FORM</title>
<body>
<link rel="stylesheet" type="text/css" href="table.css" />
<table border=1>
<?php
$row = 1;
if (($handle = fopen('data.csv', 'r')) !== FALSE)
{
echo '<table>';
// Get headers
if (($data = fgetcsv($handle, 1000, ',')) !== FALSE)
{
echo '<tr><th>'.implode('</th><th>', $data).'</th></tr>';
}
// Get the rest
while (($data = fgetcsv($handle, 1000, ',')) !== FALSE)
{
echo '<tr><td>'.implode('</td><td>', $data).'</td></tr>';
}
fclose($handle);
echo '</table>';
}
?>
</table>
</body>
</html>