Topic: Help me Obi Wan...
Gah! I'm either very tired of just plain stupid. I can't figure this thing out. I have an array $a containing a list of fruits:
$a = array('apples', 'oranges');
I also have an array $b containing a list of fruits and their quantities:
$b = array('apples' => 4, 'bananas' => 2, 'oranges' => 12, 'grapes' => 1);
Now I want to construct a third array $c that is the intersection of $a and $b based on values from $a and keys from $b. I.e. I want to do something like this:
$c = cool_mix_of_php_array_functions($a, $b);
and get: array('apples' => 4, 'oranges' => 12);
Anyone?