|
@@ -1050,15 +1050,15 @@ |
|
|
block discarded – undo |
|
1050
|
1050
|
} |
|
1051
|
1051
|
|
|
1052
|
1052
|
/** |
|
1053
|
|
- * Formats a line (passed as a fields array) as CSV and returns the CSV as a string. |
|
1054
|
|
- * from https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
|
1053
|
+ * Formats a line (passed as a fields array) as CSV and returns the CSV as a string. |
|
|
1054
|
+ * from https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
1055
|
1055
|
* |
|
1056
|
1056
|
* @param array $fields a line of the array |
|
1057
|
1057
|
* @param string @delimiter the delimiter char |
|
1058
|
1058
|
* @param string @enclosure the enclosure char |
|
1059
|
1059
|
* @param boolean $encloseAll enclose all |
|
1060
|
1060
|
* @param boolean $nullToMysqlNull |
|
1061
|
|
- */ |
|
|
1061
|
+ */ |
|
1062
|
1062
|
function arrayToCsv( array $fields, $delimiter = ';', $enclosure = '"', $encloseAll = false, $nullToMysqlNull = false ) { |
|
1063
|
1063
|
$delimiter_esc = preg_quote($delimiter, '/'); |
|
1064
|
1064
|
$enclosure_esc = preg_quote($enclosure, '/'); |
Please login to merge, or discard this patch.