note 67661 added to function.array-intersect
| From: | nthitz at gmail dot com | Date: | Fri, 09 Jun 2006 04:09:23 +0000 |
| Subject: | note 67661 added to function.array-intersect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114012@lists.php.net to get a copy of this message | ||
I did some trials and if you know the approximate size of the arrays then it would seem to be a lot
faster to do this <?php array_intersect($smallerArray, $largerArray); ?> Where $smallerArray
is the array with lesser items. I only tested this with long strings but I would imagine that it is
somewhat universal.
----
Server IP: 64.71.164.2
Probable Submitter: 69.129.199.106
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array-intersect.php
Edit -- http://master.php.net/note/edit/67661
Del: integrated -- http://master.php.net/note/delete/67661/integrated
Del: useless -- http://master.php.net/note/delete/67661/useless
Del: bad code -- http://master.php.net/note/delete/67661/bad+code
Del: spam -- http://master.php.net/note/delete/67661/spam
Del: non-english -- http://master.php.net/note/delete/67661/non-english
Del: in docs -- http://master.php.net/note/delete/67661/in+docs
Del: other reasons-- http://master.php.net/note/delete/67661
Reject -- http://master.php.net/note/reject/67661
Search -- http://master.php.net/manage/user-notes.php