-
Notifications
You must be signed in to change notification settings - Fork 0
ExportCSV
Mehdi Bounya edited this page Jul 17, 2018
·
3 revisions
The \PHPForms\ExportCSV()
class is used to export data to a CSV file.
- Arguments:
-
string $file_path
: The CSV file path, if none exists it will be created. -
array $data = []
: Data to be exported. -
array $map = []
: A map for the data. Read more here
-
- Arguments:
-
string $file_path
: File path
-
Set CSV file path
- Arguments:
-
string $name
: The field name -
string $value
: Field's value
-
Add data to be exported, if data exists with the same field name its value will be replaced.
- Arguments:
-
array $map
: Map to set
-
Add a map to the exporter, if a map already exists it will be overwritten. More on maps
- Returns: bool
Export the data to the CSV file, return TRUE on success or FALSE otherwise. If a file already exists the data will be appended to it. If no file was found a new one will be created.