cvs: phpdoc /en/reference/array/functions array-search.xml

From: Date: Thu, 01 Jan 2004 06:44:47 +0000
Subject: cvs: phpdoc /en/reference/array/functions array-search.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969357800@lists.php.net to get a copy of this message
kennyt Thu Jan 1 01:44:47 2004 EDT Modified files: /phpdoc/en/reference/array/functions array-search.xml Log: Switched argument order. It's needle, haystack, as stated just a few lines above. ;-) Index: phpdoc/en/reference/array/functions/array-search.xml diff -u phpdoc/en/reference/array/functions/array-search.xml:1.7 phpdoc/en/reference/array/functions/array-search.xml:1.8 --- phpdoc/en/reference/array/functions/array-search.xml:1.7 Tue Dec 16 04:26:34 2003 +++ phpdoc/en/reference/array/functions/array-search.xml Thu Jan 1 01:44:47 2004 @@ -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>

« previous php.doc (#969357800) next »