mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
a010a415e3
commit
b66067051c
1 changed files with 3 additions and 2 deletions
|
@ -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 => value</literal> pairs are
|
||||
|
|
Loading…
Reference in a new issue