mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Explained parameters in a varlist
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@168168 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
24b526c3d4
commit
d8cfd5d911
1 changed files with 42 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue