mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Added new example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@257845 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8cf5fa0c7d
commit
7362172ae6
1 changed files with 24 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- $Revision: 1.20 $ -->
|
||||
<refentry xml:id="function.list" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>list</refname>
|
||||
|
@ -98,6 +98,29 @@ while (list($id, $name, $salary) = mysql_fetch_row($result)) {
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using nested <function>list</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
list($a, list($b, $c)) = array(1, array(2, 3));
|
||||
|
||||
var_dump($a, $b, $c);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Using <function>list</function> with array indices</title>
|
||||
|
|
Loading…
Reference in a new issue