note 33734 added to function.array-intersect
| From: | mikhail_kovalev at mail dot ru | Date: | Sat, 05 Jul 2003 19:53:55 +0000 |
| Subject: | note 33734 added to function.array-intersect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51568@lists.php.net to get a copy of this message | ||
[quote]
Two elements are considered equal if and only if (string) $elem1 === (string) $elem2. In words: when
the string representation is the same.
[/quote]
What is this? String representation of any array is "Array", and so, all arrays are equal
according to this rule. Therefore the elements of the arrays cannot be arrays themselves.
Say, if $array_1 and $array_2 are of the form
array(
array(...),
array(...),
array(...),
...)
array_intersect($array_1, $array_2) will return same as array_merge($array_1, $array_2).
----
Manual Page -- http://www.php.net/manual/en/function.array-intersect.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33734
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33734&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33734&report=yes