Canadian Fair Dates - 2008

$row = 0;
$ind = 0;
$rows = array();
$header = array();

$handle = fopen("/web/docs/data/misc/Fairs.txt", "r");

while (($data = fgets($handle)) !== FALSE) {
$data = ereg_replace('"', '', $data);
list($col1, $col2, $col3, $col4, $col5) = split("\t", $data);

$pos = strpos($col1, ':');

if ($pos === false and trim($col2) == '' and trim($col3) == '' and trim($col4) == '' and trim($col5) == '')
$rows[] = array('data' => array (' ', ' ', ' ', ' ', ' '));

$rows[] = array('data' => array($col1, $col2, $col3, $col4, $col5));

$row++;
}
fclose($handle);

$header[] = 'FAIR LOCATION';
$header[] = 'TIME';
$header[] = 'DATE';
$header[] = 'RACE SECRETARY';
$header[] = 'PHONE';

return(theme('table', $header, $rows));

Have something to say about this? Log in or create an account to post a comment.