TwistPHP Documentation

generateCSV

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

generateCSVGenerate the CSV data from a multi-dimensional array of data, ability to use a custom delimiter and enclosure.

Parameters

Name Type Description
$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
$arrData = array(=> 'foo'=> 'bar');
$strDelimiter ';
$strEnclosure = '"';

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