mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Reworded array_rand so that reader is not addressed as "you", and incorporated edit suggested by anonymous 35207
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332157 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
939ec473b8
commit
99cec05cd4
1 changed files with 7 additions and 7 deletions
|
@ -33,9 +33,7 @@
|
|||
<term><parameter>num</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies how many entries you want to pick. Trying to pick more
|
||||
elements than there are in the array will result in an
|
||||
<constant>E_WARNING</constant> level error.
|
||||
Specifies how many entries should be picked.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -45,10 +43,12 @@
|
|||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
If you are picking only one entry, <function>array_rand</function>
|
||||
returns the key for a random entry. Otherwise, it returns an array
|
||||
of keys for the random entries. This is done so that you can pick
|
||||
random keys as well as values out of the array.
|
||||
When picking only one entry, <function>array_rand</function> returns
|
||||
the key for a random entry. Otherwise, an array of keys for the random
|
||||
entries is returned. This is done so that random keys can be picked
|
||||
from the array as well as random values. Trying to pick more elements
|
||||
than there are in the array will result in an
|
||||
<constant>E_WARNING</constant> level error, and NULL will be returned.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="changelog">
|
||||
|
|
Loading…
Reference in a new issue