mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Switched argument order. It's needle, haystack, as stated just a few lines above. ;-)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147608 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
98e2c2c736
commit
c2b6fb8a1f
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.array-search">
|
||||
<refnamediv>
|
||||
|
@ -53,10 +53,10 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$array = array(0 => "blue", 1 => "red", 2 => "green", 3 => "red");
|
||||
$array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red');
|
||||
|
||||
$key = array_search($array, "green"); // $key = 2;
|
||||
$key = array_search($array, "red"); // $key = 1;
|
||||
$key = array_search('green', $array); // $key = 2;
|
||||
$key = array_search('red', $array); // $key = 1;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue