|
@@ -1129,15 +1129,15 @@ |
|
|
block discarded – undo |
|
1129
|
1129
|
} |
|
1130
|
1130
|
|
|
1131
|
1131
|
/** |
|
1132
|
|
- * Formats a line (passed as a fields array) as CSV and returns the CSV as a string. |
|
1133
|
|
- * from https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
|
1132
|
+ * Formats a line (passed as a fields array) as CSV and returns the CSV as a string. |
|
|
1133
|
+ * from https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
1134
|
1134
|
* |
|
1135
|
1135
|
* @param array $fields a line of the array |
|
1136
|
1136
|
* @param string $delimiter the delimiter char |
|
1137
|
1137
|
* @param string $enclosure the enclosure char |
|
1138
|
1138
|
* @param boolean $encloseAll enclose all |
|
1139
|
1139
|
* @param boolean $nullToMysqlNull |
|
1140
|
|
- */ |
|
|
1140
|
+ */ |
|
1141
|
1141
|
function arrayToCsv( array $fields, $delimiter = ';', $enclosure = '"', $encloseAll = false, $nullToMysqlNull = false ) { |
|
1142
|
1142
|
$delimiter_esc = preg_quote($delimiter, '/'); |
|
1143
|
1143
|
$enclosure_esc = preg_quote($enclosure, '/'); |
Please login to merge, or discard this patch.