cvs: /phpdoc/functions array.sgml
| From: | Andrey Zmievski | Date: | Tue, 07 Sep 1999 19:00:29 +0000 |
| Subject: | cvs: /phpdoc/functions array.sgml | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10672@lists.php.net to get a copy of this message | ||
andrey Tue Sep 7 15:00:29 1999 EDT
Modified files:
/phpdoc/functions array.sgml
Log:
Docs for new array_keys() parameter.
Index: phpdoc/functions/array.sgml
diff -u phpdoc/functions/array.sgml:1.19 phpdoc/functions/array.sgml:1.20
--- phpdoc/functions/array.sgml:1.19 Sun Sep 5 23:21:59 1999
+++ phpdoc/functions/array.sgml Tue Sep 7 15:00:28 1999
@@ -58,17 +58,25 @@
<funcsynopsis>
<funcdef>array <function>array_keys</function></funcdef>
<paramdef>array <parameter>input</parameter></paramdef>
+ <paramdef>mixed
+
<parameter><optional>search_value</optional></parameter></paramdef>
</funcsynopsis>
<para>
- <function>array_keys</function> returns all the keys, numeric and string, from the
<parameter>input</parameter> array.
+ <function>array_keys</function> returns the keys, numeric and string, from the
<parameter>input</parameter> array.
<para>
+ If the optional <parameter>search_value</parameter> is specified, then only the
keys for that value are returned. Otherwise, all the keys from the
<parameter>input</parameter> are returned.
+
+ <para>
<example>
<title><function>array_keys</function> example</title>
<programlisting>
$array = array(0 => 100, "color" => "red");
-array_keys($array); // returns array(0, "color")
+array_keys($array); // returns array(0, "color")
+
+$array = array(1, 100, 2, 100);
+array_keys($array, 100); // returns array(0, 2)
</programlisting>
</example>