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.13&r2=1.14&ty=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.xml Wed 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="opt"><type>string</type><parameter>delimiter</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>enclosure</parameter></methodparam> </methodsynopsis> + + <para> + <variablelist> + <varlistentry> + <term><parameter>handle</parameter></term> + <listitem> + <simpara> + A valid file pointer to a file successfully opened by <function>fopen</function>, + <function>popen</function>, or <function>fsockopen</function>. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</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> + <term><parameter>delimiter</parameter> (Optional)</term> + <listitem> + <simpara> + Set the field delimiter (one character only). Defaults as a comma. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>enclosure</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 <function>fgets</function> except that <function>fgetcsv</function> parses the line it reads for fields in <acronym>CSV</acronym> format and returns an array containing - the fields read. The optional third <parameter>delimiter</parameter> - parameter defaults as a comma, and the optional <parameter>enclosure</parameter> - defaults as a double quotation mark. Both <parameter>delimiter</parameter> - and <parameter>enclosure</parameter> are limited to one character. If - either is more than one character, only the first character is used. - </simpara> - <note> - <simpara> - The <parameter>enclosure</parameter> parameter was added in PHP 4.3.0. - </simpara> - </note> - <simpara> - The <parameter>handle</parameter> parameter must be a valid file pointer to a file - successfully opened by <function>fopen</function>, - <function>popen</function>, or <function>fsockopen</function>. - </simpara> - <simpara> - The <parameter>length</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> <function>fgetcsv</function> returns &false; on error, including