philip Fri May 30 14:01:41 2003 EDT
Modified files:
/phpdoc/en/reference/array/functions array.xml
Log:
Link to the array type docs, added php tags in examples, and see also foreach.
Index: phpdoc/en/reference/array/functions/array.xml
diff -u phpdoc/en/reference/array/functions/array.xml:1.6
phpdoc/en/reference/array/functions/array.xml:1.7
--- phpdoc/en/reference/array/functions/array.xml:1.6 Tue Feb 4 13:19:35 2003
+++ phpdoc/en/reference/array/functions/array.xml Fri May 30 14:01:41 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.110 -->
<refentry id="function.array">
<refnamediv>
@@ -16,7 +16,9 @@
</methodsynopsis>
<para>
Returns an array of the parameters. The parameters can be given
- an index with the <literal>=></literal> operator.
+ an index with the <literal>=></literal> operator. Read the section
+ on the <link linkend="language.types.array">array type</link> for more
+ information on what an array is.
</para>
<para>
<note>
@@ -43,11 +45,13 @@
<title><function>array</function> example</title>
<programlisting role="php">
<![CDATA[
+<?php
$fruits = array (
"fruits" => array ("a"=>"orange", "b"=>"banana", "c"=>"apple"),
"numbers" => array (1, 2, 3, 4, 5, 6),
"holes" => array ("first", 5 => "second", "third")
-);
+)
+?>
]]>
</programlisting>
</example>
@@ -57,8 +61,10 @@
<title>Automatic index with <function>array</function></title>
<programlisting role="php">
<![CDATA[
+<?php
$array = array( 1, 1, 1, 1, 1, 8=>1, 4=>1, 19, 3=>13);
print_r($array);
+?>
]]>
</programlisting>
<para>
@@ -89,8 +95,10 @@
<title>1-based index with <function>array</function></title>
<programlisting role="php">
<![CDATA[
+<?php
$firstquarter = array(1 => 'January', 'February', 'March');
print_r($firstquarter);
+?>
]]>
</programlisting>
<para>
@@ -110,7 +118,9 @@
</para>
<para>
See also <function>array_pad</function>,
- <function>list</function>, and <function>range</function>.
+ <function>list</function>,
+ <link linkend="control-structures.foreach">foreach</link>, and
+ <function>range</function>.
</para>
</refsect1>
</refentry>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php