- more clarification of count (and sizeof)

- linkage to the Arrays sub-section of the Types section
  no one seems to be able to find that section so they can RTFM


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@49875 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Daniel Beckham 2001-06-20 14:26:02 +00:00
parent 5c75598b7a
commit f0568677de

View file

@ -13,6 +13,11 @@
There are specific database handling functions for populating
arrays from database queries, and several functions return arrays.
</simpara>
<para>
Please see the <link linkend="language.types.array">Arrays</link>
section of the manual for a detailed explanation of how arrays are
implemented and used in PHP.
</para>
<para>
See also <function>is_array</function>, <function>explode</function>,
<function>implode</function>, <function>split</function>
@ -1781,7 +1786,7 @@ $result = compact ("event", "nothing_here", $location_vars);
Returns 1 if the variable is not an array.
</para>
<para>
Returns 0 if the variable is not set.
Returns 0 if the variable is not set or is an empty array.
<warning>
<para>
<function>Count</function> may return 0 for a variable that
@ -1791,6 +1796,11 @@ $result = compact ("event", "nothing_here", $location_vars);
</para>
</warning>
</para>
<para>
Please see the <link linkend="language.types.array">Arrays</link>
section of the manual for a detailed explanation of how arrays are
implemented and used in PHP.
</para>
<para>
<example>
<title><function>Count</function> example</title>
@ -1799,10 +1809,22 @@ $a[0] = 1;
$a[1] = 3;
$a[2] = 5;
$result = count ($a);
//$result == 3
// $result == 3
$b[0] = 7;
$b[5] = 9;
$b[10] = 11;
$result = count ($b);
// $result == 3;
</programlisting>
</example>
</para>
<note>
<para>
The <function>sizeof</function> function is an alias for
<function>count</function>.
</para>
</note>
<para>
See also: <function>sizeof</function>,
<function>isset</function>, and