I have two arrays. The one's array key is another's value. Here is code:
$arr1 = array(
'a' => 'apple',
'b' => 'banana',
'c' => 'pear',
);
$arr2 = array(
'bird' => 'a',
'dog' => 'b',
);
And my question, how to combine two arrays in one like:
$arr3 = array(
'bird' => 'apple',
'dog' => 'banana',
);
Is there have some array function to do this probably?
$arr2values into the keys of$arr1using foreach,$arr1[$value_from_$arr2]no need for special functions