public static function print_array(array &$records, $delimiter = 'comma', $enclosure = '"', $return = false) {
        $csvdata = new csv_export_writer($delimiter, $enclosure);
        foreach ($records as $row) {
            $csvdata->add_data($row);
        }
        $data = $csvdata->print_csv_data($return);
        if ($return) {
            return $data;
        }
    }
public static function print_array(array &$records, $delimiter = 'comma', $enclosure = '"', $return = false) {
        $csvdata = new csv_export_writer($delimiter, $enclosure);
        foreach ($records as $row) {
            $csvdata->add_data($row);
        }
        $data = $csvdata->print_csv_data($return);
        if ($return) {
            return $data;
        }
    }
public static function print_array ( array & $ records , $ delimiter = 'comma' , $ enclosure = '"' , $ return = false ) { $ csvdata = new csv_export_writer ( $ delimiter , $ enclosure ) ; foreach ( $ records as $ row ) { $ csvdata -> add_data ( $ row ) ; } $ data = $ csvdata -> print_csv_data ( $ return ) ; if ( $ return ) { return $ data ; } }
This will convert an array of values into a deliminated string.
Like the above function, this is for convenience.

@param array $records     An array of information to be converted.
@param string $delimiter  The name of the delimiter. Supported types(comma, tab, semicolon, colon, cfg)
@param string $enclosure  How speical fields are enclosed.
@param bool $return       If true will return a string with the csv data.
@return string            csv data.
This will convert an array of values into a deliminated string . Like the above function this is for convenience .