some initial docs and examples for spl/arrays

#can somebody check my poor english, please?


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@155850 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes
2004-04-13 14:20:11 +00:00
parent df8eeaa337
commit 4d76cf9220
4 changed files with 135 additions and 11 deletions

View File

@@ -1,21 +1,55 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.ArrayObject-construct">
<refnamediv>
<refname>ArrayObject::__construct</refname>
<refpurpose>
Construct a new array object
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>ArrayObject::__construct</methodname>
<methodparam><type>mixed</type><parameter>ar</parameter></methodparam>
<methodparam><type>mixed</type><parameter>input</parameter></methodparam>
</methodsynopsis>
<para>
This constructs a new array object. The <parameter>input</parameter>
parameter accepts an array or another ArrayObject.
</para>
<para>
<example>
<title><function>ArrayObject::__construct</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$array = array('1' => 'one',
'2' => 'two',
'3' => 'three');
&warn.undocumented.func;
$arrayobject = new ArrayObject($array);
var_dump($arrayobject);
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
object(ArrayObject)#1 (3) {
[1]=>
string(3) "one"
[2]=>
string(3) "two"
[3]=>
string(5) "three"
}
]]>
</screen>
</example>
</para>
</refsect1>
</refentry>