Skip to content

Commit

Permalink
Update str-getcsv.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Aug 28, 2023
1 parent 5cd6555 commit 6bc4946
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion reference/strings/functions/str-getcsv.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 6330e4d73192c49a6867c6bbc3cbf09d63a1e36a Maintainer: daijie Status: ready -->
<!-- EN-Revision: 272838c8815f95572a60d30e39dfb1feba3e497c Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.str-getcsv">
<refnamediv>
Expand Down Expand Up @@ -144,6 +144,36 @@ array(5) {
[4]=>
string(5) "Swift"
}
]]>
</screen>
</example>
</para>
<para>
<example>
<title>处理空字符串的 <function>str_getcsv</function> 示例</title>
<caution>
<simpara>
对于空字符串,此函数返回值 <code>[null]</code> 从而代替空数组。
</simpara>
</caution>
<programlisting role="php">
<![CDATA[
<?php
$string = '';
$data = str_getcsv($string);
var_dump($data);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
array(1) {
[0]=>
NULL
}
]]>
</screen>
</example>
Expand Down

0 comments on commit 6bc4946

Please sign in to comment.