rasmus Mon Jul 9 16:38:39 2001 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
Updated range() docs
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.78 phpdoc/en/functions/array.xml:1.79
--- phpdoc/en/functions/array.xml:1.78 Sat Jul 7 18:11:15 2001
+++ phpdoc/en/functions/array.xml Mon Jul 9 16:38:39 2001
@@ -2670,7 +2670,7 @@
<refnamediv>
<refname>range</refname>
<refpurpose>
- Create an array containing a range of integers
+ Create an array containing a range of elements
</refpurpose>
</refnamediv>
<refsect1>
@@ -2678,14 +2678,26 @@
<funcsynopsis>
<funcprototype>
<funcdef>array <function>range</function></funcdef>
- <paramdef>int <parameter>low</parameter></paramdef>
- <paramdef>int <parameter>high</parameter></paramdef>
+ <paramdef>mixed <parameter>low</parameter></paramdef>
+ <paramdef>mixed <parameter>high</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
- <function>range</function> returns an array of integers from
+ <function>range</function> returns an array of elements from
<parameter>low</parameter> to <parameter>high</parameter>,
- inclusive.
+ inclusive. If low > high, the sequence will be from high to
+ low.
+ <example>
+ <title><function>range</function> example</title>
+ <programlisting role="php">
+foreach(range(0,9) as $number) {
+ echo $number;
+}
+foreach(range('a','z') as $letter) {
+ echo $letter;
+}
+ </programlisting>
+ </example>
</para>
<para>
See <function>shuffle</function> for an example of its use.
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jesus M. Castagnetto
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jesus M. Castagnetto
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Hartmut Holzgraefe
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Stig Bakken
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jesus M. Castagnetto
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Daniel Beckham
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Egon Schmid
- Re: [PHP-DOC] cvs: phpdoc /en/functions array.x... Daniel Beckham
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Rasmus Lerdorf
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Rasmus Lerdorf
- Re: [PHP-DOC] cvs: phpdoc /en/functions array.x... Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Damien Seguy
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jon Parise
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jeroen van Wolffelaar
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jeroen van Wolffelaar
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Hojtsy Gabor
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Jeroen van Wolffelaar
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Marco Cucinato
