kennyt          Tue Feb  3 13:29:00 2004 EDT

  Modified files:              
    /phpdoc/en/reference/var/functions  is-array.xml 
  Log:
  Add is_array example.
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/var/functions/is-array.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/var/functions/is-array.xml
diff -u phpdoc/en/reference/var/functions/is-array.xml:1.2 
phpdoc/en/reference/var/functions/is-array.xml:1.3
--- phpdoc/en/reference/var/functions/is-array.xml:1.2  Wed Apr 17 02:44:57 2002
+++ phpdoc/en/reference/var/functions/is-array.xml      Tue Feb  3 13:29:00 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <!-- splitted from ./en/functions/var.xml, last change in rev 1.2 -->
   <refentry id="function.is-array">
    <refnamediv>
@@ -17,6 +17,30 @@
      otherwise.
     </para>
     <para>
+     <example>
+      <title>Check that variable is an array</title>
+      <programlisting>
+<![CDATA[
+<?php
+$yes = array('this', 'is', 'an array');
+
+echo is_array($yes) ? 'Array' : 'not Array';
+echo '<br/>';
+
+$no = 'this is a string';
+
+echo is_array($no) ? 'Array' : 'not Array';
+?>
+]]>
+      </programlisting>
+      <screen>
+<![CDATA[
+Array<br/>
+not Array]]>
+      </screen>
+     </example>
+    </para>
+    <para>
      See also 
      <function>is_float</function>,
      <function>is_int</function>,

Reply via email to