2010-03-28 22:10:10 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-07-11 09:08:43 +00:00
|
|
|
<!-- $Revision$ -->
|
2007-06-20 22:25:43 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-getcsv">
|
2007-01-28 02:27:25 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>str_getcsv</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Parse a CSV string into an array
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsect1 role="description">
|
|
|
|
&reftitle.description;
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>array</type><methodname>str_getcsv</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>input</parameter></methodparam>
|
2014-04-14 23:48:06 +00:00
|
|
|
<methodparam choice="opt"><type>string</type><parameter>delimiter</parameter><initializer>","</initializer></methodparam>
|
2009-11-25 14:49:47 +00:00
|
|
|
<methodparam choice="opt"><type>string</type><parameter>enclosure</parameter><initializer>'"'</initializer></methodparam>
|
2014-04-14 23:48:06 +00:00
|
|
|
<methodparam choice="opt"><type>string</type><parameter>escape</parameter><initializer>"\\"</initializer></methodparam>
|
2007-01-28 02:27:25 +00:00
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
2011-08-17 10:35:35 +00:00
|
|
|
Parses a string input for fields in <acronym>CSV</acronym> format
|
|
|
|
and returns an array containing the fields read.
|
2008-12-10 16:36:01 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="parameters">
|
|
|
|
&reftitle.parameters;
|
|
|
|
<para>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>input</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
The string to parse.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>delimiter</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-11-25 14:49:47 +00:00
|
|
|
Set the field delimiter (one character only).
|
2008-12-10 16:36:01 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>enclosure</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2009-11-25 14:49:47 +00:00
|
|
|
Set the field enclosure character (one character only).
|
2008-12-10 16:36:01 +00:00
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>escape</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Set the escape character (one character only). Defaults as a backslash
|
|
|
|
(<literal>\</literal>)
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 role="returnvalues">
|
|
|
|
&reftitle.returnvalues;
|
|
|
|
<para>
|
|
|
|
Returns an indexed array containing the fields read.
|
2007-01-28 02:27:25 +00:00
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-06-11 22:14:07 +00:00
|
|
|
|
2007-10-15 13:40:05 +00:00
|
|
|
<refsect1 role="seealso">
|
|
|
|
&reftitle.seealso;
|
|
|
|
<para>
|
|
|
|
<simplelist>
|
|
|
|
<member><function>fgetcsv</function></member>
|
|
|
|
</simplelist>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-01-28 02:27:25 +00:00
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2009-09-25 07:04:39 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2007-01-28 02:27:25 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|