note 104950 added to function.array-intersect-key
| From: | pgl at yoyo dot org | Date: | Mon, 18 Jul 2011 15:01:11 +0000 |
| Subject: | note 104950 added to function.array-intersect-key | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181657@lists.php.net to get a copy of this message | ||
Note that the order of the keys in the returned array is the same as the order of the keys in the
source array. eg:
<?php
$array = array(
'two' => 'a',
'three' => 'b',
'one' => 'c',
);
$keyswant = array(
'one' => '',
'three' => '',
);
print_r(array_intersect_key($array, $keyswant));
?>
Shows:
Array
(
[three] => b
[one] => c
)
----
Server IP: 109.169.40.147
Probable Submitter: 188.39.44.187
----
Manual Page -- http://www.php.net/manual/en/function.array-intersect-key.php
Edit -- https://master.php.net/note/edit/104950
Del: integrated -- https://master.php.net/note/delete/104950/integrated
Del: useless -- https://master.php.net/note/delete/104950/useless
Del: bad code -- https://master.php.net/note/delete/104950/bad+code
Del: spam -- https://master.php.net/note/delete/104950/spam
Del: non-english -- https://master.php.net/note/delete/104950/non-english
Del: in docs -- https://master.php.net/note/delete/104950/in+docs
Del: other reasons-- https://master.php.net/note/delete/104950
Reject -- https://master.php.net/note/reject/104950
Search -- https://master.php.net/manage/user-notes.php