Location: PHPKode > scripts > EasyCSV > jwage-EasyCSV-803d5c6/lib/EasyCSV/Writer.php
<?php

namespace EasyCSV;

class Writer extends AbstractBase
{
    public function writeRow($row)
    {
        if (is_string($row)) {
            $row = explode(',', $row);
            $row = array_map('trim', $row);
        }
        return fputcsv($this->_handle, $row, $this->_delimiter, $this->_enclosure);
    }

    public function writeFromArray(array $array)
    {
        foreach ($array as $key => $value) {
            $this->writeRow($value);
        }
    }
}
Return current item: EasyCSV