mirror of
https://github.com/parsecsv/parsecsv-for-php.git
synced 2026-02-19 08:36:39 +00:00
save readability
This commit is contained in:
@@ -255,10 +255,14 @@ class parseCSV {
|
||||
* @param fields field names
|
||||
* @return true or false
|
||||
*/
|
||||
function save ($file = null, $data = array(), $append = false, $fields = array()) {
|
||||
if ( empty($file) ) $file = &$this->file;
|
||||
$mode = ( $append ) ? 'at' : 'wt' ;
|
||||
$is_php = ( preg_match('/\.php$/i', $file) ) ? true : false ;
|
||||
public function save ($file = null, $data = array(), $append = false, $fields = array()) {
|
||||
if (empty($file)) {
|
||||
$file = &$this->file;
|
||||
}
|
||||
|
||||
$mode = ($append) ? 'at' : 'wt';
|
||||
$is_php = (preg_match('/\.php$/i', $file)) ? true : false;
|
||||
|
||||
return $this->_wfile($file, $this->unparse($data, $fields, $append, $is_php), $mode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user