eschmid         Sun Apr  8 10:11:02 2001 EDT

  Modified files:              
    /phpdoc/en/functions        array.xml 
    /phpdoc/de/functions        array.xml 
  Log:
  Fixed funcdef for in_array and updated the German docs.
  
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.63 phpdoc/en/functions/array.xml:1.64
--- phpdoc/en/functions/array.xml:1.63  Sun Apr  8 09:34:13 2001
+++ phpdoc/en/functions/array.xml       Sun Apr  8 10:11:02 2001
@@ -2109,10 +2109,12 @@
     <title>Description</title>
     <funcsynopsis>
      <funcprototype>
-      <funcdef>bool in_array</funcdef>
+      <funcdef>bool <function>in_array</function></funcdef>
       <paramdef>mixed <parameter>needle</parameter></paramdef>
       <paramdef>array <parameter>haystack</parameter></paramdef>
-      <paramdef>bool <parameter><optional>strict</optional></parameter></paramdef>
+      <paramdef>bool 
+       <parameter><optional>strict</optional></parameter>
+      </paramdef>
      </funcprototype>
     </funcsynopsis>
     <para>
@@ -2170,7 +2172,7 @@
     </refpurpose>
    </refnamediv>
    <refsect1>
-    <title>Description</title>
+    <title>Description</title> 
     <funcsynopsis>
      <funcprototype>
       <funcdef>mixed <function>array_search</function></funcdef>
Index: phpdoc/de/functions/array.xml
diff -u phpdoc/de/functions/array.xml:1.9 phpdoc/de/functions/array.xml:1.10
--- phpdoc/de/functions/array.xml:1.9   Tue Jan  9 10:42:53 2001
+++ phpdoc/de/functions/array.xml       Sun Apr  8 10:11:02 2001
@@ -1453,37 +1453,64 @@
   <refentry id="function.in-array">
    <refnamediv>
     <refname>in_array</refname>
-    <refpurpose>Return true if a value exists in an array</refpurpose>
+    <refpurpose>Return TRUE if a value exists in an array</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <funcsynopsis>
      <funcprototype>
-      <funcdef>bool in_array</funcdef>
+      <funcdef>bool <function>in_array</function></funcdef>
       <paramdef>mixed <parameter>needle</parameter></paramdef>
       <paramdef>array <parameter>haystack</parameter></paramdef>
+      <paramdef>bool
+       <parameter><optional>strict</optional></parameter>
+      </paramdef>
      </funcprototype>
     </funcsynopsis>
-
     <para>
      Searches <parameter>haystack</parameter> for
-     <parameter>needle</parameter> and returns true if it is found in
-     the array, false otherwise.</para>
-
+     <parameter>needle</parameter> and returns <literal>TRUE</literal> 
+     if it is found in the array, <literal>FALSE</literal> otherwise.
+    </para>
+    <para>
+     If the third parameter <parameter>strict</parameter> is set to
+     <literal>TRUE</literal> then the <function>in_array</function>
+     will also check the types of the <parameter>needle</parameter>
+     in the <parameter>haystack</parameter>.
+    </para>
     <para>
      <example>
-      <title><function>in_array</function> example</title>
-      <programlisting>
-$os = array("Mac", "NT", "Irix", "Linux");
-if (in_array("Irix", $os))
-       print "Got Irix";
+      <title><function>In_array</function> example</title>
+      <programlisting role="php">
+$os = array ("Mac", "NT", "Irix", "Linux");
+if (in_array ("Irix", $os)){
+    print "Got Irix";
+    }
       </programlisting>
      </example>
+    </para>
+    <para>
+     <example>
+      <title><function>In_array</function> with strict example</title>
+      <programlisting role="php">
+<?php
+$a = array('1.10', 12.4, 1.13);
+
+if (in_array('12.4', $a, TRUE))
+    echo &quot;'12.4' found with strict check\n&quot;;
+if (in_array(1.13, $a, TRUE))
+    echo &quot;1.13 found with strict check\n&quot;;
+?>
 
-    <note>
-     <para>
-      This function was added in PHP 4.0.</para> 
-    </note></para>
+// This will output:
+
+1.13 found with strict check
+      </programlisting>
+     </example>
+    </para>
+    <para>
+     See also <function>array_search</function>.
+    </para>
    </refsect1>
   </refentry>
 
@@ -2118,7 +2145,7 @@
 sgml-indent-step:1
 sgml-indent-data:t
 sgml-parent-document:nil
-sgml-default-dtd-file:"../manual.ced"
+sgml-default-dtd-file:"../../manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil


Reply via email to