Voting

: max(one, zero)?
(Example: nine)

The Note You're Voting On

pgl at yoyo dot org
13 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