jimw Thu Dec 20 18:23:12 2001 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
in_array: note match is case-sensitive, add example
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.140 phpdoc/en/functions/array.xml:1.141
--- phpdoc/en/functions/array.xml:1.140 Thu Dec 20 17:23:24 2001
+++ phpdoc/en/functions/array.xml Thu Dec 20 18:23:12 2001
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.140 $ -->
+<!-- $Revision: 1.141 $ -->
<reference id="ref.array">
<title>Array Functions</title>
<titleabbrev>Arrays</titleabbrev>
@@ -2613,6 +2613,12 @@
will also check the <link linkend="language.types">types</link> of
the <parameter>needle</parameter> in the <parameter>haystack</parameter>.
</para>
+ <note>
+ <para>
+ If <parameter>needle</parameter> is a string, the comparison is done in
+ a case-sensitive manner.
+ </para>
+ </note>
<para>
<example>
<title><function>in_array</function> example</title>
@@ -2621,6 +2627,9 @@
$os = array ("Mac", "NT", "Irix", "Linux");
if (in_array ("Irix", $os)) {
print "Got Irix";
+}
+if (in_array ("mac", $os)) { # fails because in_array() is case-sensitive
+ print "Got mac";
}
]]>
</programlisting>- [PHP-DOC] cvs: phpdoc /en/functions array.xml Philip Olson
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Gyozo Papp
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Torben Wilson
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml jim winstead
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Georg Richter
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Markus Fischer
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Rui Hirokawa
- [PHP-DOC] cvs: phpdoc /en/functions array.xml Gyozo Papp
- Re: [PHP-DOC] cvs: phpdoc /en/functions array.xml Egon Schmid
- Re: [PHP-DOC] cvs: phpdoc /en/functions array.... Papp Gyozo
- Re: [PHP-DOC] cvs: phpdoc /en/functions ar... Egon Schmid
- Re: [PHP-DOC] cvs: phpdoc /en/functions array.... Hartmut Holzgraefe
