TwistPHP Documentation

export

File path: dist/twist/Core/Utilities/CSV.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

exportCreate a CSV file on the server, pass in a multi-dimensional array of data containing keys and values, the keys will be used as the field names and the values will be each for in the CSV. By default the Delimiter, Enclosure and Escape are already set.

Parameters

Name Type Description
$strLocalFilestringn/a
$arrDataarrayn/a
[$strDelimiter = ']stringn/a
[$strEnclosure = '"']stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strLocalFile 'foo';
$arrData = array(=> 'foo'=> 'bar');
$strDelimiter ';
$strEnclosure = '"';

//Call the function export with the example vars
Twist::CSV() -> export($strLocalFile$arrData$strDelimiter$strEnclosure);