[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
helly Mon Mar 7 13:47:13 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: - Update http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.17r2=1.18ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.17 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.18 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.17 Fri Feb 4 05:25:59 2005 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlMon Mar 7 13:47:12 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.17 $ -- +!-- $Revision: 1.18 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -32,7 +32,9 @@ listitem simpara Must be greater than the longest line (in characters) to be found in the CSV file - (allowing for trailing line-end characters). It became optional in PHP 5. + (allowing for trailing line-end characters). It became optional in PHP 5. Omitting + this parameter (or setting it to 0 in PHP 5.0.3 and later) the maximum line length + is not limited, which is slighlty slower. /simpara /listitem /varlistentry
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
nlopess Mon Mar 7 14:09:37 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: its php5.0.4 http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.18r2=1.19ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.18 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.19 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.18 Mon Mar 7 13:47:12 2005 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlMon Mar 7 14:09:37 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.18 $ -- +!-- $Revision: 1.19 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -33,7 +33,7 @@ simpara Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters). It became optional in PHP 5. Omitting - this parameter (or setting it to 0 in PHP 5.0.3 and later) the maximum line length + this parameter (or setting it to 0 in PHP 5.0.4 and later) the maximum line length is not limited, which is slighlty slower. /simpara /listitem
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
vrana Fri Feb 4 05:25:59 2005 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Locale sensitive (bug #31740) http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.16r2=1.17ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.16 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.17 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.16 Mon Sep 27 11:24:05 2004 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlFri Feb 4 05:25:59 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.16 $ -- +!-- $Revision: 1.17 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -97,6 +97,13 @@ para functionfgetcsv/function has been binary safe since PHP 4.3.5 /para +note + simpara + Locale setting is taken into account by this function. If + varnameLANG/varname is e.g. literalen_US.UTF-8/literal, files in + one-byte encoding are read wrong by this function. + /simpara +/note note.line-endings; para See also functionexplode/function, functionfile/function,
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
aidan Sat Sep 25 22:21:15 2004 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Added note about line endings, bug #30097 http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.14r2=1.15ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.14 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.15 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.14 Wed Sep 8 01:55:52 2004 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlSat Sep 25 22:21:15 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.14 $ -- +!-- $Revision: 1.15 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -97,6 +97,7 @@ para functionfgetcsv/function has been binary safe since PHP 4.3.5 /para +note.line-endings; para See also functionexplode/function, functionfile/function, and functionpack/function
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
aidan Wed Sep 8 01:55:53 2004 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Explained parameters in a varlist http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.13r2=1.14ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.13 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.14 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.13 Thu Aug 12 14:11:57 2004 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlWed Sep 8 01:55:52 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.13 $ -- +!-- $Revision: 1.14 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -15,30 +15,51 @@ methodparam choice=opttypestring/typeparameterdelimiter/parameter/methodparam methodparam choice=opttypestring/typeparameterenclosure/parameter/methodparam /methodsynopsis + +para + variablelist + varlistentry + termparameterhandle/parameter/term + listitem +simpara + A valid file pointer to a file successfully opened by functionfopen/function, + functionpopen/function, or functionfsockopen/function. +/simpara + /listitem + /varlistentry + varlistentry + termparameterlength/parameter (Optional)/term + listitem +simpara + Must be greater than the longest line (in characters) to be found in the CSV file + (allowing for trailing line-end characters). It became optional in PHP 5. +/simpara + /listitem + /varlistentry + varlistentry + termparameterdelimiter/parameter (Optional)/term + listitem +simpara + Set the field delimiter (one character only). Defaults as a comma. +/simpara + /listitem + /varlistentry + varlistentry + termparameterenclosure/parameter (Optional)/term + listitem +simpara + Set the field enclosure character (one character only). Defaults as a double quotation mark. Added in PHP 4.3.0. +/simpara + /listitem + /varlistentry + /variablelist +/para + simpara Similar to functionfgets/function except that functionfgetcsv/function parses the line it reads for fields in acronymCSV/acronym format and returns an array containing - the fields read. The optional third parameterdelimiter/parameter - parameter defaults as a comma, and the optional parameterenclosure/parameter - defaults as a double quotation mark. Both parameterdelimiter/parameter - and parameterenclosure/parameter are limited to one character. If - either is more than one character, only the first character is used. -/simpara -note - simpara - The parameterenclosure/parameter parameter was added in PHP 4.3.0. - /simpara -/note -simpara - The parameterhandle/parameter parameter must be a valid file pointer to a file - successfully opened by functionfopen/function, - functionpopen/function, or functionfsockopen/function. -/simpara -simpara - The parameterlength/parameter parameter must be greater than the longest - line to be found in the CSV file (allowing for trailing line-end characters). - It became optional in PHP 5. + the fields read. /simpara simpara functionfgetcsv/function returns false; on error, including
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
ali Fri Jul 30 10:03:28 2004 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: closing paragraph element in example http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/fgetcsv.xml?r1=1.11r2=1.12ty=u Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.11 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.12 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.11 Thu Jul 22 18:51:11 2004 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlFri Jul 30 10:03:28 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.11 $ -- +!-- $Revision: 1.12 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv @@ -60,7 +60,7 @@ $handle = fopen(test.csv, r); while (($data = fgetcsv($handle, 1000, ,)) !== FALSE) { $num = count($data); -echo p $num fields in line $row: br /\n; +echo p $num fields in line $row: br //p\n; $row++; for ($c=0; $c $num; $c++) { echo $data[$c] . br /\n;
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
philip Thu Oct 17 21:48:11 2002 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Rewrote to hopefully make more sense. See also explode, file, and pack. Moved enclosure added in PHP 4.3.0 to a note. Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.4 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.5 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.4Sun May 26 22:16:07 2002 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlThu Oct 17 21:48:11 +2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.4 $ -- +!-- $Revision: 1.5 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv -19,20 +19,24 Similar to functionfgets/function except that functionfgetcsv/function parses the line it reads for fields in acronymCSV/acronym format and returns an array containing - the fields read. The field delimiter is a comma, unless you - specify another delimiter with the optional third parameter. The - enclosure character is double quote, unless it is - specified. parameterDelimiter/parameter and - parameterenclosure/parameter cannot be null and only first - character is used when they are specified. + the fields read. The optional third parameterdelimiter/parameter + parameter defaults as a comma. The optional parameterenclosure/parameter + cannot be typenull/type, and is limited to one character. If + parameterenclosure/parameter is more than one character, only the + first character is used. /simpara +note + simpara + The parameterenclosure/parameter parameter was added in PHP 4.3.0. + /simpara +/note simpara - parameterFp/parameter must be a valid file pointer to a file + The parameterfp/parameter parameter must be a valid file pointer to a file successfully opened by functionfopen/function, - functionpopen/function, or functionfsockopen/function + functionpopen/function, or functionfsockopen/function. /simpara simpara - parameterLength/parameter must be greater than the longest + The parameterlength/parameter parameter must be greater than the longest line to be found in the CSV file (allowing for trailing line-end characters). /simpara simpara -42,34 +46,36 note simpara A blank line in a CSV file will be returned as an array - comprising a single null; field, and will not be treated as an - error. - /simpara - simpara - parameterenclosure/parameter is added from PHP 4.3.0. + comprising a single typenull/type field, and will not be treated + as an error. /simpara /note -example - title - functionfgetcsv/function example - Read and print entire - contents of a CSV file - /title - programlisting role=php +para + example + titleRead and print the entire contents of a CSV file/title + programlisting role=php ![CDATA[ +?php $row = 1; $fp = fopen (test.csv,r); while ($data = fgetcsv ($fp, 1000, ,)) { $num = count ($data); -print p $num fields in line $row: br; +print p $num fields in line $row: br\n; $row++; for ($c=0; $c $num; $c++) { -print $data[$c] . br; +print $data[$c] . br\n; } } fclose ($fp); +? ]] - /programlisting -/example + /programlisting + /example +/para +para + See also functionexplode/function, functionfile/function, + and functionpack/function +/para /refsect1 /refentry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
yohgaki Sun May 26 22:16:09 2002 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: Added new parameter Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.3 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.4 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.3Tue Apr 23 06:33:39 2002 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlSun May 26 22:16:07 +2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.3 $ -- +!-- $Revision: 1.4 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv -13,13 +13,18 methodparamtypeint/typeparameterfp/parameter/methodparam methodparamtypeint/typeparameterlength/parameter/methodparam methodparam choice=opttypestring/typeparameterdelimiter/parameter/methodparam + methodparam +choice=opttypestring/typeparameterenclosure/parameter/methodparam /methodsynopsis simpara Similar to functionfgets/function except that functionfgetcsv/function parses the line it reads for fields in acronymCSV/acronym format and returns an array containing the fields read. The field delimiter is a comma, unless you - specify another delimiter with the optional third parameter. + specify another delimiter with the optional third parameter. The + enclosure character is double quote, unless it is + specified. parameterDelimiter/parameter and + parameterenclosure/parameter cannot be null and only first + character is used when they are specified. /simpara simpara parameterFp/parameter must be a valid file pointer to a file -39,6 +44,9 A blank line in a CSV file will be returned as an array comprising a single null; field, and will not be treated as an error. + /simpara + simpara + parameterenclosure/parameter is added from PHP 4.3.0. /simpara /note example
[PHP-DOC] cvs: phpdoc /en/reference/filesystem/functions fgetcsv.xml
cortesi Tue Apr 23 06:33:39 2002 EDT Modified files: /phpdoc/en/reference/filesystem/functions fgetcsv.xml Log: adding: parameter note Index: phpdoc/en/reference/filesystem/functions/fgetcsv.xml diff -u phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.2 phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.3 --- phpdoc/en/reference/filesystem/functions/fgetcsv.xml:1.2Wed Apr 17 02:38:06 2002 +++ phpdoc/en/reference/filesystem/functions/fgetcsv.xmlTue Apr 23 06:33:39 +2002 -1,5 +1,5 ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.2 $ -- +!-- $Revision: 1.3 $ -- !-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -- refentry id=function.fgetcsv refnamediv -27,18 +27,20 functionpopen/function, or functionfsockopen/function /simpara simpara - Length must be greater than the longest line to be found in the - CSV file (allowing for trailing line-end characters). + parameterLength/parameter must be greater than the longest + line to be found in the CSV file (allowing for trailing line-end characters). /simpara simpara functionfgetcsv/function returns false; on error, including end of file. /simpara -simpara - N.B. A blank line in a CSV file will be returned as an array - comprising a single null; field, and will not be treated as an - error. -/simpara +note + simpara + A blank line in a CSV file will be returned as an array + comprising a single null; field, and will not be treated as an + error. + /simpara +/note example title functionfgetcsv/function example - Read and print entire