mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Added search_array().
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@41533 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6b9df7290d
commit
8d47e43d5d
1 changed files with 35 additions and 0 deletions
|
@ -1818,6 +1818,41 @@ if (in_array(1.13, $a, true))
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>search_array</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.search-array">
|
||||
<refnamediv>
|
||||
<refname>search_array</refname>
|
||||
<refpurpose>Searches the array for a given value and returns the corresponding key if successful</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>mixed search_array</funcdef>
|
||||
<paramdef>mixed <parameter>needle</parameter></paramdef>
|
||||
<paramdef>array <parameter>haystack</parameter></paramdef>
|
||||
<paramdef>bool <parameter>strict</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Searches <parameter>haystack</parameter> for
|
||||
<parameter>needle</parameter> and returns the key if it is found in
|
||||
the array, false otherwise.
|
||||
</para>
|
||||
<para>
|
||||
If the third parameter <parameter>strict</parameter> is set to
|
||||
<literal>TRUE</literal> then the <function>search_array</function>
|
||||
will also check the types of the <parameter>needle</parameter>
|
||||
in the <parameter>haystack</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>in_array</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue