setDelimiter("\t"); //the delimiter will be the tab character $writer->setNewline("\r\n"); //use windows line endings for compatibility with some csv libraries $writer->setOutputBOM(Writer::BOM_UTF8); //adding the BOM sequence on output $writer->insertOne($header); $writer->insertAll($contents); ?> Using the Writer class

Example 4: Using the Writer class

The table representation of the csv

toHTML('table-csv-data with-header');?>

The Raw CSV to be saved