#
# [[CSVfile? &CSVf=/dir/file.csv]]
#
if (file_exists($this->config['base_path'].$CSVf))
{$csvlines = file($this->config['base_path'].$CSVf); }
else return "Not found $this->config['base_path'].$CSVf" ;
$csvout = '<table border=1 cellspacing=0 cellpadding=3>';
foreach ( $csvlines as $line )
{
$csv=explode(';',$line); $line='<tr><td>'.implode('</td><td>',$csv).'</td></tr>';
$csvout=$csvout.$line;
}
return $csvout.'</table>';
A cool way to easily go from csv to html table.
Very nice snippetA cool way to easily go from csv to html table.