note 106895 added to function.array-flip
| From: | Final at osu1 dot php dot net | Date: | Fri, 16 Dec 2011 12:16:45 +0000 |
| Subject: | note 106895 added to function.array-flip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185088@lists.php.net to get a copy of this message | ||
I find this function vey useful when you have a big array and you want to know if a given value is
in the array. in_array in fact becomes quite slow in such a case, but you can flip the big array and
then use isset to obtain the same result in a much faster way.
----
Server IP: 81.88.49.31
Probable Submitter: 188.218.143.184
----
Manual Page -- http://www.php.net/manual/en/function.array-flip.php
Edit -- https://master.php.net/note/edit/106895
Del: integrated -- https://master.php.net/note/delete/106895/integrated
Del: useless -- https://master.php.net/note/delete/106895/useless
Del: bad code -- https://master.php.net/note/delete/106895/bad+code
Del: spam -- https://master.php.net/note/delete/106895/spam
Del: non-english -- https://master.php.net/note/delete/106895/non-english
Del: in docs -- https://master.php.net/note/delete/106895/in+docs
Del: other reasons-- https://master.php.net/note/delete/106895
Reject -- https://master.php.net/note/reject/106895
Search -- https://master.php.net/manage/user-notes.php