PHP 8.5.0 Alpha 4 available for testing

Voting

: one plus four?
(Example: nine)

The Note You're Voting On

pgl at yoyo dot org
14 years ago
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
)

<< Back to user notes page

To Top