note 124616 added to function.array-search
| From: | dir at aksonet dot com | Date: | Wed, 15 Jan 2020 12:54:24 +0000 |
| Subject: | note 124616 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-213884@lists.php.net to get a copy of this message | ||
ÐÑÐ¸Ð¼ÐµÑ #1 ÐÑимеÑ
иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ array_search()
<?php
$array = array(0 => 'blue', 1 => 'red', 2 => 'green', 3 =>
'red');
$key = array_search('green', $array); // $key = 2;
$key = array_search('red', $array); // $key = 1;
?>
РеÑли бÑÐ´ÐµÑ Ñак:
$key = array_search('none-none', $array); // $key = 0;
ÐеÑÐ½ÐµÑ 0, а 0 => 'blue , а поиÑк бÑл
none-none
ÐЧÐÐЬ ÐÐ ÐÐÐ Ð ÐÐТÐЫРÐÐ ÐÐÐÐ !!!
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.168 (proxied: 46.98.123.19)
----
Manual Page -- http://php.net/manual/en/function.array-search.php
Edit -- https://master.php.net/note/edit/124616
Del: integrated -- https://master.php.net/note/delete/124616/integrated
Del: useless -- https://master.php.net/note/delete/124616/useless
Del: bad code -- https://master.php.net/note/delete/124616/bad+code
Del: spam -- https://master.php.net/note/delete/124616/spam
Del: non-english -- https://master.php.net/note/delete/124616/non-english
Del: in docs -- https://master.php.net/note/delete/124616/in+docs
Del: other reasons-- https://master.php.net/note/delete/124616
Reject -- https://master.php.net/note/reject/124616
Search -- https://master.php.net/manage/user-notes.php