PHP » PYTHON |
login |
register |
about
|
import csv writer_object = csv.writer(open('filename.csv', 'w'), delimiter=',', quotechar='"') For each row you want to write: writer_object.writerow([1,2,3,4,5]) fputcsv(PHP 5 >= 5.1.0) fputcsv — Format line as CSV and write to file pointer Description
int fputcsv
( resource $handle
, array $fields
[, string $delimiter
[, string $enclosure
]] )
fputcsv() formats a line (passed as a fields array) as CSV and write it (terminated by a newline) to the specified file handle . Parameters
Return ValuesReturns the length of the written string, or FALSE on failure. Examples
Example #1 fputcsv() example
<?php
Notes
|
more
Recently updated
more
Most requested
more
Last requests
|