You appear to be a bot. Output may be restricted
Description
Output Generate a CSV based string for output.
Usage
$[string] = parseCSV::output( $filename, $data, $fields, $delimiter );
Parameters
- $filename
- ( [string] ) optional – If specified, headers and data will be output directly to browser as a downloable file
- $data
- ( [array] ) optional –
- D array with data
- $fields
- ( [array] ) optional – Field names
- $delimiter
- ( [type] ) optional – delimiter used to separate data
Returns
[string]
Source
File name: easy-digital-downloads/includes/libraries/parsecsv.lib.php
Lines:
1 to 24 of 24
public function output($filename = null, $data = array(), $fields = array(), $delimiter = null) { if (empty($filename)) { $filename = $this->output_filename; } if ($delimiter === null) { $delimiter = $this->output_delimiter; } $data = $this->unparse($data, $fields, null, null, $delimiter); if (!is_null($filename)) { header('Content-type: application/csv'); header('Content-Length: ' . strlen($data)); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header('Expires: 0'); header('Content-Disposition: attachment; filename="' . $filename . '"; modification-date="' . date('r') . '";'); echo $data; } return $data; }