note 124881 added to function.array-search
| From: | it2 dot mnr at gmail dot com | Date: | Sat, 04 Apr 2020 06:54:21 +0000 |
| Subject: | note 124881 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-214415@lists.php.net to get a copy of this message | ||
About searcing in multi-dimentional arrays;
note on "xfoxawy at gmail dot com":
If you use your own keys in a multidimensional array, this will not work. Better use for this
situation:
array_search($searchingValue, array_map(function($val){return $val['KEY_NAME'];},
$inputArray));
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.195 (proxied: 46.22.56.185)
----
Manual Page -- http://php.net/manual/en/function.array-search.php
Edit -- https://master.php.net/note/edit/124881
Del: integrated -- https://master.php.net/note/delete/124881/integrated
Del: useless -- https://master.php.net/note/delete/124881/useless
Del: bad code -- https://master.php.net/note/delete/124881/bad+code
Del: spam -- https://master.php.net/note/delete/124881/spam
Del: non-english -- https://master.php.net/note/delete/124881/non-english
Del: in docs -- https://master.php.net/note/delete/124881/in+docs
Del: other reasons-- https://master.php.net/note/delete/124881
Reject -- https://master.php.net/note/reject/124881
Search -- https://master.php.net/manage/user-notes.php