Fix doc bug #55343 (documentation needs to be more clear) by making the

array_intersect_assoc() example more explicit.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@314091 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2011-08-02 09:33:49 +00:00
parent a010a415e3
commit b66067051c

View file

@ -71,7 +71,7 @@
<![CDATA[
<?php
$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");
$array2 = array("a" => "green", "b" => "yellow", "blue", "red");
$result_array = array_intersect_assoc($array1, $array2);
print_r($result_array);
?>
@ -94,7 +94,8 @@ Array
The value <literal>"red"</literal> is not returned because in
<varname>$array1</varname> its key is <literal>0</literal> while
the key of "red" in <varname>$array2</varname> is
<literal>1</literal>.
<literal>1</literal>, and the key <literal>"b"</literal> is not returned
because its values are different in each array.
</simpara>
<simpara>
The two values from the <literal>key =&gt; value</literal> pairs are